REST Profiles API API Reference

Profiles

The Profiles API is used to manage Profiles.

Profiles can be created, list and deleted.

Profiles can be used with the REST Profiles API

Authentication

  • In header the access token generated from the authorization-server (ses-console) using OAuth2 Flow Client Credentials or PKCE.
Authorization: Bearer YOUR_ACCESS_TOKEN
  • In header the API Key generated from the authorization-server (ses-console)
Authorization: Key YOUR_API_KEY
  • In querystring the API Key as key parameter
?key=YOUR_API_KEY

Note about the input/output text

  • The input text passed as a URL parameter will be escaped with an equivalent of the javascript 'encodeURIComponent' function.
  • The input text must be encoded in UTF-8.
  • The output text will be encoded in UTF-8.

Language code values

The language codes to be used are the two-letter codes defined by the ISO 639-1:2002, Codes for the representation of names of languages - Part 1: Alpha-2 code standard.

Refer to the column 'ISO 639-1 code' of this list: http://www.loc.gov/standards/iso639-2/php/code_list.php.

In addition to this list, the following codes are used:

Language Code Language
auto Language Detection
tj Tajik (cyrillic script)
zh-Hans Chinese (Simplified)
zh-Hant Chinese (Traditional)
Schemes: https
Version: 1.5.0

Authentication

accessToken

"Bearer access_token" OR "Key api_key"

type
apiKey
name
Authorization
in
header

apiKey

API Key

type
apiKey
name
key
in
query

Profiles

Profiles

Get API version

GET /profiles/apiVersion

Current version for this API

callback: string
in query

Javascript callback function name for JSONP Support

Successful response

400 Bad Request

Invalid parameters

500 Internal Server Error

Error

Response Content-Types: application/json
Response Example (200 OK)
{
  "version": "1.0.0"
}

List Profiles

GET /profiles

List accessible profiles

id: string
in

Profile id in UUID format (Universally Unique IDentifier)

translationResourceId: string
in

Optional. Translation Resource Id in UUID format (Universally Unique IDentifier) use GET /translationResources to fetch Translation Resources available If source and target are not used. translationResourceId will required.

source: array
in

Source language code

Array values passed as multiple parameters: ?source=aaa&source=bbb

target: array
in

Target language code

Array values passed as multiple parameters: ?target=aaa&target=bbb

techno: array NMT, SMT, RBMT, SPE, RBMT+SPE
in

Techno

Array values passed as multiple parameters: ?techno=aaa&techno=bbb

owner: array
in

Owner selectors

Array values passed as multiple parameters: ?owner=aaa&owner=bbb

domain: array
in

Domain selectors

Array values passed as multiple parameters: ?domain=aaa&domain=bbb

size: string S, M, L
in

Size selectors

sharingStatus: string public, groups, users, private
in

Indicate the profile visibility. if the profile has been shared with another users, groups or everyone (public)

activated: boolean
in

Indicate if the profile is activated

running: boolean
in

Indicate if the profile is running

skip: number
in

Indicate the number of profiles to skip

limit: number
in

Indicate the number of profiles to display

sortName: string
in

Indicate the field on which we want to sort

sortOrder: string
in

Indicate the order of sort

200 OK

Successful response

type
object
400 Bad Request

Invalid parameters

500 Internal Server Error

Error

Response Content-Types: application/json
Response Example (200 OK)
{
  "profiles": [
    {
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "name": "Profile ENFR",
      "source": "en",
      "target": "en",
      "owner": "Systran",
      "domain": "Generic",
      "size": "M",
      "techno": "NMT",
      "activated": true,
      "running": true,
      "insertionTime": 1553249481632,
      "sharingStatus": "NMT",
      "dictionaries": [
        null
      ],
      "normalizations": [
        null
      ],
      "translationMemories": [
        null
      ],
      "translationResourceId": "4b80a3f5-aff2-41ba-a5ce-21603738432a"
    }
  ]
}

Create

POST /profiles/create

Create a profile

translationResourceId: string
in

Optional. Translation Resource Id in UUID format (Universally Unique IDentifier) use GET /translationResources to fetch Translation Resources available If source and target are not used. translationResourceId will required.

name: string
in

Profile name

public: boolean
in

Indicate the profile visibility. if public is set to true, the profile will be accessible to everyone

dictionaries: string[]
in

Dictionaries attached to the profile, This parameter can be repeated. (Array)

Array values passed as multiple parameters: ?dictionaries=aaa&dictionaries=bbb

normalizations: string[]
in

Normalizations attached to the profile, This parameter can be repeated. (Array)

Array values passed as multiple parameters: ?normalizations=aaa&normalizations=bbb

translationMemories: string[]
in

Translation Memories attached to the profile, This parameter can be repeated. (Array)

Array values passed as multiple parameters: ?translationMemories=aaa&translationMemories=bbb

source: string
in

Optional. Source language code

target: string
in

Optional. Target language code

owner: string
in

Optional. Owner (default to "Systran")

domain: string
in

Optional. Domain (default to "Generic")

size: string S, M, L, XL
in

Optional. Size (default to "L")

options: object[]
in

Options for advanced usage only. Properties name, value

200 OK

Successful response

type
object
400 Bad Request

Invalid parameters

500 Internal Server Error

Error

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "translationResourceId": "4b80a3f5-aff2-41ba-a5ce-21603738432a"
}

Delete

POST /profiles/delete

Delete a profile

id: string
in

Profile id in UUID format (Universally Unique IDentifier)

200 OK

Successful response

type
object
400 Bad Request

Invalid parameters

500 Internal Server Error

Error

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "deleted": true
}

Deactivate

POST /profiles/deactivate

Deactivate a profile

id: string[]
in

Profile id in UUID format (Universally Unique IDentifier) - This parameter can be repeated.

Array values passed as multiple parameters: ?id=aaa&id=bbb

200 OK

Successful response

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "status": [
    {
      "activated": false,
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "statusCode": 200,
      "message": "Error message"
    }
  ]
}

Activate

POST /profiles/activate

Activate a profile

id: string[]
in

Profile id in UUID format (Universally Unique IDentifier) - This parameter can be repeated.

Array values passed as multiple parameters: ?id=aaa&id=bbb

200 OK

Successful response

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "status": [
    {
      "activated": true,
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "statusCode": 200,
      "message": "Error message"
    }
  ]
}

Translation Resources

Translation Resources

List Translation Resources

GET /translationResources

List Translation Resources available

source: array
in

Source language code

Array values passed as multiple parameters: ?source=aaa&source=bbb

target: array
in

Target language code

Array values passed as multiple parameters: ?target=aaa&target=bbb

owner: array
in

Owner selectors

Array values passed as multiple parameters: ?owner=aaa&owner=bbb

domain: array
in

Domain selectors

Array values passed as multiple parameters: ?domain=aaa&domain=bbb

techno: array NMT, SMT, RBMT, SPE, RBMT+SPE
in

Techno

Array values passed as multiple parameters: ?techno=aaa&techno=bbb

status: array running, not installed, installed, installing dependencies, downloading, downloaded
in

default to "running".

Array values passed as multiple parameters: ?status=aaa&status=bbb

200 OK

Successful response

type
object
400 Bad Request

Invalid parameters

500 Internal Server Error

Error

Response Content-Types: application/json
Response Example (200 OK)
{
  "translationResources": [
    {
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "name": "Translator NMT Generic - ENFR",
      "version": "9.2.1",
      "source": "en",
      "target": "en",
      "owner": "Systran",
      "domain": "Generic",
      "size": "M",
      "techno": "NMT",
      "upgradeable": true,
      "upgradeableDependencies": true,
      "status": "running",
      "expectedStatus": "running",
      "nbProfiles": 3
    }
  ]
}

Schema Definitions

ProfilesObject: object

Profile Object

id: string

Profile id in UUID format (Universally Unique IDentifier)

name: string

Profile name

source: string

Source language code

target: string

Target language code

owner: string

Owner selectors

domain: string

Domain selectors

size: string S, M

Size selectors

techno: string NMT, SMT, RBMT, SPE, RBMT+SPE

Techno

activated: boolean

Indicate if the profile is activated

running: boolean

Indicate if the profile is running

insertionTime: string

Profile creation or edition timestamp

sharingStatus: string public, groups, users, private

Indicate the profile visibility. if the profile has been shared with another users, groups or everyone (public)

dictionaries: DictionariesObject

dictionaries attached to the profile

DictionariesObject
normalizations: NormalizationsObject

Normalizations attached to the profile

NormalizationsObject
translationMemories: TranslationMemoriesObject

Translation Memories attached to the profile

TranslationMemoriesObject
translationResourceId: string

Translation Resource Id in UUID format (Universally Unique IDentifier)

Example
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "name": "Profile ENFR",
  "source": "en",
  "target": "en",
  "owner": "Systran",
  "domain": "Generic",
  "size": "M",
  "techno": "NMT",
  "activated": true,
  "running": true,
  "insertionTime": 1553249481632,
  "sharingStatus": "NMT",
  "dictionaries": [
    null
  ],
  "normalizations": [
    null
  ],
  "translationMemories": [
    null
  ],
  "translationResourceId": "4b80a3f5-aff2-41ba-a5ce-21603738432a"
}

ProfilesActivationObject: object

activated: boolean

The new active status.

id: string

Profile Identifier in UUID format (Universally Unique IDentifier)

statusCode: integer

The operation status code

message: string

Error message in case of failure

Example
{
  "activated": true,
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "statusCode": 200,
  "message": "Error message"
}

ProfilesDeactivationObject: object

activated: boolean

The new active status.

id: string

Profile Identifier in UUID format (Universally Unique IDentifier)

statusCode: integer

The operation status code

message: string

Error message in case of failure

Example
{
  "activated": false,
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "statusCode": 200,
  "message": "Error message"
}

TranslationResourcesObject: object

Translation Resources Object

id: string

Translation Resource Identifier in UUID format (Universally Unique IDentifier)

name: string

Translation Resource name

version: string

Translation Resource version

source: string

Source language code

target: string

Target language code

owner: string

Owner selectors

domain: string

Domain selectors

size: string S, M

Size selectors

techno: string NMT, SMT, RBMT, SPE, RBMT+SPE

Techno

upgradeable: boolean

Indicate if a new version is available for this Translation Resource

upgradeableDependencies: boolean

Indicate if a new dependencies are available for this Translation Resource

status: boolean

Indicate if the Translation Resource is running

expectedStatus: boolean

Indicate if the Translation Resource will be running

nbProfiles: number

Profile number using this Translation Resource

Example
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "name": "Translator NMT Generic - ENFR",
  "version": "9.2.1",
  "source": "en",
  "target": "en",
  "owner": "Systran",
  "domain": "Generic",
  "size": "M",
  "techno": "NMT",
  "upgradeable": true,
  "upgradeableDependencies": true,
  "status": "running",
  "expectedStatus": "running",
  "nbProfiles": 3
}

ProfilesResponse: object

profiles: object[]

List of Profiles available

object

Profile Object

id: string

Profile id in UUID format (Universally Unique IDentifier)

name: string

Profile name

source: string

Source language code

target: string

Target language code

owner: string

Owner selectors

domain: string

Domain selectors

size: string S, M

Size selectors

techno: string NMT, SMT, RBMT, SPE, RBMT+SPE

Techno

activated: boolean

Indicate if the profile is activated

running: boolean

Indicate if the profile is running

insertionTime: string

Profile creation or edition timestamp

sharingStatus: string public, groups, users, private

Indicate the profile visibility. if the profile has been shared with another users, groups or everyone (public)

dictionaries: DictionariesObject

dictionaries attached to the profile

DictionariesObject
normalizations: NormalizationsObject

Normalizations attached to the profile

NormalizationsObject
translationMemories: TranslationMemoriesObject

Translation Memories attached to the profile

TranslationMemoriesObject
translationResourceId: string

Translation Resource Id in UUID format (Universally Unique IDentifier)

Example
{
  "profiles": [
    {
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "name": "Profile ENFR",
      "source": "en",
      "target": "en",
      "owner": "Systran",
      "domain": "Generic",
      "size": "M",
      "techno": "NMT",
      "activated": true,
      "running": true,
      "insertionTime": 1553249481632,
      "sharingStatus": "NMT",
      "dictionaries": [
        null
      ],
      "normalizations": [
        null
      ],
      "translationMemories": [
        null
      ],
      "translationResourceId": "4b80a3f5-aff2-41ba-a5ce-21603738432a"
    }
  ]
}

TranslationResourcesResponse: object

translationResources: object[]

List of Translation Resources available

object

Translation Resources Object

id: string

Translation Resource Identifier in UUID format (Universally Unique IDentifier)

name: string

Translation Resource name

version: string

Translation Resource version

source: string

Source language code

target: string

Target language code

owner: string

Owner selectors

domain: string

Domain selectors

size: string S, M

Size selectors

techno: string NMT, SMT, RBMT, SPE, RBMT+SPE

Techno

upgradeable: boolean

Indicate if a new version is available for this Translation Resource

upgradeableDependencies: boolean

Indicate if a new dependencies are available for this Translation Resource

status: boolean

Indicate if the Translation Resource is running

expectedStatus: boolean

Indicate if the Translation Resource will be running

nbProfiles: number

Profile number using this Translation Resource

Example
{
  "translationResources": [
    {
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "name": "Translator NMT Generic - ENFR",
      "version": "9.2.1",
      "source": "en",
      "target": "en",
      "owner": "Systran",
      "domain": "Generic",
      "size": "M",
      "techno": "NMT",
      "upgradeable": true,
      "upgradeableDependencies": true,
      "status": "running",
      "expectedStatus": "running",
      "nbProfiles": 3
    }
  ]
}

ProfilesCreateResponse: object

id: string

Profile Identifier in UUID format (Universally Unique IDentifier)

translationResourceId: string

Optional. translationResourceId used by the profile.

Example
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "translationResourceId": "4b80a3f5-aff2-41ba-a5ce-21603738432a"
}

ProfilesDeleteResponse: object

id: string

Profile Identifier in UUID format (Universally Unique IDentifier)

deleted: string

Deleted status

Example
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "deleted": true
}

ProfilesActivationResponse: object

status: object[]

List of id, active status and statusCode

object
activated: boolean

The new active status.

id: string

Profile Identifier in UUID format (Universally Unique IDentifier)

statusCode: integer

The operation status code

message: string

Error message in case of failure

Example
{
  "status": [
    {
      "activated": true,
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "statusCode": 200,
      "message": "Error message"
    }
  ]
}

ProfilesDeactivationResponse: object

status: object[]

List of id, active status and statusCode

object
activated: boolean

The new active status.

id: string

Profile Identifier in UUID format (Universally Unique IDentifier)

statusCode: integer

The operation status code

message: string

Error message in case of failure

Example
{
  "status": [
    {
      "activated": false,
      "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
      "statusCode": 200,
      "message": "Error message"
    }
  ]
}

Profile: object

Profile

id: string

Profile UUID (Universally Unique IDentifier)

private: boolean

Public or private profile

Example
{
  "id": "6b80a3f5-aff2-41ba-a5ce-21603738432e",
  "private": false
}

ApiVersionResponse: object

version: string
Example
{
  "version": "1.0.0"
}

ErrorResponse: object

message: string

Readable description of the error

statusCode: integer
info: object

Additional information about the error

Example
{
  "message": "Internal error",
  "statusCode": 500,
  "info": "object"
}