RosaeNLG API (4.3.0)

Download OpenAPI specification:Download

Ludan Stoecklé: contact@rosaenlg.org URL: https://rosaenlg.org License: Apache-2.0

API over the Natural Language Generation library RosaeNLG, on AWS lambda.

Authentication

auth0

oauth2 using auth0, machine to machine.

Don't use scope, but add audience in the token request.

Security Scheme Type OAuth2
clientCredentials OAuth Flow
Token URL: https://dev-bjq72juz.eu.auth0.com/oauth/token
Scopes:

    rapidApi

    using secret key RapidAPI-Proxy-Secret in header (when called by RapidAPI)

    Security Scheme Type API Key
    Header parameter name: RapidAPI-Proxy-Secret

    Get the deployed RosaeNLG version.

    Authorizations:
    header Parameters
    X-RapidAPI-User
    string

    ID of the user, when going through Rapid API

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "1.15.4"
    }

    Get the IDs of the templates for user.

    Contains both the loaded templates and the ones which are on the permanent storage

    Authorizations:
    header Parameters
    X-RapidAPI-User
    string

    ID of the user, when going through Rapid API

    Responses

    Response samples

    Content type
    application/json
    {
    • "ids": [
      ]
    }

    Deletes an existing template for a user.

    Template will be unloaded, and deleted on the disk or S3 if permanent storage is set.

    Authorizations:
    path Parameters
    templateId
    required
    string
    Example: chanson

    ID of the template

    header Parameters
    X-RapidAPI-User
    string

    ID of the user, when going through Rapid API

    Responses

    Gets information on a template: sha1 and the original content.

    Authorizations:
    path Parameters
    templateId
    required
    string
    Example: chanson

    ID of the template

    header Parameters
    X-RapidAPI-User
    string

    ID of the user, when going through Rapid API

    Responses

    Response samples

    Content type
    application/json
    {
    • "templateSha1": "1bfdbcd203ec8e6f889b068fbb2d7d298b1db903",
    • "templateContent": {
      }
    }

    Renders an existing template using data.

    Renders an existing template using data passed in the request. Payload is in additionnal properties of the input.

    Authorizations:
    path Parameters
    language
    required
    string
    Enum: "fr_FR" "de_DE" "it_IT" "en_US" "es_ES" "OTHER"
    Example: fr_FR

    language

    templateId
    required
    string
    Example: chanson

    ID of the template

    templateSha1
    required
    string
    Example: 1bfdbcd203ec8e6f889b068fbb2d7d298b1db903

    sha1 of the template (from create call)

    header Parameters
    X-RapidAPI-User
    string

    ID of the user, when going through Rapid API

    Request Body schema: application/json
    language
    required
    string
    Enum: "fr_FR" "en_US" "de_DE" "it_IT" "es_ES" "OTHER"

    the language of the template

    forceRandomSeed
    integer

    the random seed value, if it must be forced

    defaultSynoMode
    string

    default mode for synonyms

    defaultAmong
    integer

    default value for among

    renderDebug
    boolean

    activate render debug (default false)

    property name*
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "language": "fr_FR",
    • "chanson": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "renderedText": "<p>Il chantera \"Non, je ne regrette rien\" d'Édith Piaf</p>",
    • "renderOptions": {
      },
    • "templateSha1": "someSha1",
    • "outputData": { }
    }

    Creates a new template.

    Creates a template from a JSON containing a packaged template.

    The template is validated, loaded, autotested (if configured so), and saved on disk or S3 if persistent storage is set.

    It can be either a real template with code etc., or a template that points to another existing one (use type existing and which property).

    Authorizations:
    path Parameters
    language
    required
    string
    Enum: "fr_FR" "de_DE" "it_IT" "en_US" "es_ES" "OTHER"
    Example: fr_FR

    language

    header Parameters
    X-RapidAPI-User
    string

    ID of the user, when going through Rapid API

    Request Body schema: application/json
    format
    string

    version of the format

    templateId
    required
    string

    ID of the template

    type
    string
    Enum: "existing" "custom"

    Type of the template.

    • Use custom type (default value) when you have src
    • Use existing type otherwise, with which pointing to the proper shared template name.
    which
    string

    Template name to refer to (target template must contain src and be custom type. Use only when type is existing.

    custom
    object

    Custom content for templates, generally when type is existing, to store specific personalization content for a generic template pointed by which

    object

    source of the template

    object

    the pre compiled template

    Responses

    Request samples

    Content type
    application/json
    {
    • "templateId": "chanson",
    • "src": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "templateId": "chanson",
    • "templateSha1": "1bfdbcd203ec8e6f889b068fbb2d7d298b1db903",
    • "ms": 37.48320007324219
    }