Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This documentation is not final. New endpoints will continue to be published from time to time.

...

The following parameters are required to make requests:

Parameter

Usage

Globalese base URL

Your Globalese instance URL, e.g. https://acme.globalese.ai.

Requests must be sent to this base URL + /api/v3 + the endpoint.

API key

Must be sent in the request header as Authorization: Bearer <API key>

A valid API key can be:

Endpoints

Open api
filternone
supportedSubmitMethodsnone
showUrlfalse
openapi: 3.0.2
servers: []
info:
  title: Globalese
  version: 3
  description: Globalese API v3
tags:
  - name: Corpora
  - name: Engines
  - name: Engine instances
  - name: Groups
  - name: Languages
  - name: Projects
  - name: Project files
  - name: Segment translation dispatchers
  - name: Training jobs
  - name: Translation jobs
paths:
  /corpora:
    get:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: List corpora
      description: Returns a collection of corpora.
      parameters:
        - $ref: '#/components/parameters/stringIds'
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sourceLanguage'
        - $ref: '#/components/parameters/targetLanguage'
        - $ref: '#/components/parameters/groupIds'
        - $ref: '#/components/parameters/engineId'
        - $ref: '#/components/parameters/metadataDomain'
        - $ref: '#/components/parameters/metadataSubject'
        - $ref: '#/components/parameters/metadataClient'
        - $ref: '#/components/parameters/metadataProject'
        - $ref: '#/components/parameters/metadataDescription'
        - $ref: '#/components/parameters/corpusCatServerId'
        - name: name
          in: query
          description: Full or partial corpus name for filtering.
          schema:
            type: string
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - name:asc
              - name:desc
              - counts.segment_count:asc
              - counts.segment_count:desc
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpusCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Upload a new corpus
      description: |
        The `source_language` and `target_language` are required for these formats:
        * `csv-comma`
        * `csv-memoq`
        * `csv-semicolon`
        * `tsv`

        Only a single file may be uploaded in one request. Maximum file size: 600 MB.

        A file can be uploaded as a zip archive.
        The zip archive may only contain one file, and the file format must be provided in the `format` field.

        The `Content-Disposition` header must contain the `filename` directive.
        This is taken care of by most libraries in general.

        E.g. `Content-Disposition: form-data; name="Example TM"; filename="example.xliff"`

        Required permissions:
        `MANAGE_CORPORA` in all the groups the corpus is uploaded to,
        or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/CreateCorpus'
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Corpus'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /corpora/{corpusId}:
    parameters:
      - $ref: '#/components/parameters/corpusIdInPath'
    get:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Show the details of a corpus
      description: |
        Returns a single corpus.

        Required permissions:
        `MANAGE_CORPORA` in any of the groupgroups the corpus belongs to,
        or `SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Corpus'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    patch:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Update a corpus
      description: |
        Required permissions:
        `MANAGE_CORPORA` in all the groups the corpus belongs to,
        or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/UpdateCorpus'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Corpus'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
    delete:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Delete a corpus
      description: |
        Delete a corpus.

        Required permissions:
        `MANAGE_CORPORA` in all the groups the corpus belongs to,
        or `SYSTEM_ADMINISTRATOR`
      responses:
        204:
          $ref: '#/components/responses/204NoContent'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /corpora/{corpusId}/content:
    parameters:
      - $ref: '#/components/parameters/corpusIdInPath'
    get:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Corpus content
      description: |
        Returns segments of a corpus.

        Required permissions:
        `MANAGE_CORPORA` in any of the groupgroups the corpus belongs to,
        or `SYSTEM_ADMINISTRATOR`
      parameters:
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpusContent'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /corpora/{corpusId}/events:
    parameters:
      - $ref: '#/components/parameters/corpusIdInPath'
    get:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Show the event log of a corpus
      description: |
        Returns a list of events from the corpus log.

        Required permissions:
        `MANAGE_CORPORA` in any of the groupgroups the corpus belongs to,
        or `SYSTEM_ADMINISTRATOR`
      parameters:
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - timestamp:asc
              - timestamp:desc
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpusEventCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /corpora/{corpusId}/versions:
    parameters:
      - $ref: '#/components/parameters/corpusIdInPath'
    get:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: List all versions of a corpus
      description: |
        Returns details about each version of a corpus:
        * corpus counts
        * engine IDs that used the currentcorpus corpusversion for training

       * engineRequired IDspermissions:
that used the current corpus for tuning  `MANAGE_CORPORA` or `MANAGE_ENGINES` in any of the groups the corpus Requiredbelongs permissions: `MANAGE_CORPORA` in the group the corpus belongs to,to,
        or `SYSTEM_ADMINISTRATOR`
      parameters:
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - counts.segment_count:asc
              - counts.segment_count:desc
              - version:asc
              - version:desc
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpusVersionCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      tags:
        - Corpora
      security:
        - bearer: [ ]
      summary: Update corpus content
      description: |
        Update the contents of a corpus, creating a new version thereof.

        The format of the uploaded content must be the same as the format of the original content.

        The language codes of the uploaded content must be the same as the original ones.

        Required permissions:
        `MANAGE_CORPORA` in any of the groupgroups the corpus belongs to,
        or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/UpdateCorpusContent'
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpusVersion'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /engines:
    get:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: List engines
      description: |
        Returns a collection of engines.

        A translation API key can also be used for authentication.
      parameters:
        - $ref: '#/components/parameters/numericalIds'
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sourceLanguage'
        - $ref: '#/components/parameters/targetLanguage'
        - $ref: '#/components/parameters/engineStatuses'
        - $ref: '#/components/parameters/groupIds'
        - name: name
          in: query
          description: Full or partial engine name for filtering.
          schema:
            type: string
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - name:asc
              - name:desc
              - status:asc
              - status:desc
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: Create a new engine
      description: |
        Restrictions:

        * Using stock corpora and stock engines are mutually exclusive options.
        * Stock+ engines (i.e. engines based on a stock engine) can only have core corpora.

        Required permissions: `MANAGE_ENGINES` in the group the engine belongs to, or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/CreateEngine'
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Engine'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        402:
          description: |
            Maximum number of allowed engines reached.
            Only applies to legacy subscriptions.
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
        502:
          $ref: '#/components/responses/502BadGateway'
  /engines/{engineId}:
    parameters:
      - $ref: '#/components/parameters/engineIdInPath'
    get:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: Show the details of an engine
      description: |
        Returns a single engine.

        Required permissions: `MANAGE_ENGINES`, `MANAGE_PROJECTS` or `TRANSLATE` in the group the engine belongs to, or `SYSTEM_ADMINISTRATOR`

        A translation API key can also be used for authentication.
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Engine'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    patch:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: Update an engine
      description: |
        Required permissions: `MANAGE_ENGINES` in the group the engine belongs to, or `SYSTEM_ADMINISTRATOR`

        The `published` property can only be changed if the engine has been trained or tuned before.
      requestBody:
        $ref: '#/components/requestBodies/UpdateEngine'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Engine'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    delete:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: Delete an engine
      description: |
        Delete an engine.

        Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`
      responses:
        204:
          $ref: '#/components/responses/204NoContent'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /engines/{engineId}/events:
    parameters:
      - $ref: '#/components/parameters/engineIdInPath'
    get:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: Show the event log of an engine
      description: |
        Returns a list of events from the engine log.

        Required permissions: `MANAGE_ENGINES` in the group the engine belongs to, or `SYSTEM_ADMINISTRATOR`
      parameters:
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - timestamp:asc
              - timestamp:desc
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineEventCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /engines/{engineId}/resources:
    parameters:
      - $ref: '#/components/parameters/engineIdInPath'
    get:
      tags:
        - Engines
      security:
        - bearer: [ ]
      summary: Show the resources of an engine
      description: |
        Returns the resources of a single engine's resources.

        Required permissions: `MANAGE_ENGINES` or `MANAGE_PROJECTS` in the group the engine belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineResources'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /engine-instances:
    get:
      tags:
        - Engine instances
      security:
        - bearer: [ ]
      summary: List engine instances
      description: |
        Returns a collection of engine instances (being) deployed.

        Required permissions: `MANAGE_ENGINES|TRANSLATE|SYSTEM_ADMINISTRATOR`

        A translation API key can also be used for authentication.
      parameters:
        - $ref: '#/components/parameters/numericalIds'
        - $ref: '#/components/parameters/engineIds'
        - $ref: '#/components/parameters/groupIds'
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineInstanceCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      tags:
        - Engine instances
      security:
        - bearer: [ ]
      summary: Create a new engine instance
      description: |
        Starts deploying an engine in the background.

        Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/CreateEngineInstance'
      responses:
        202:
          description: The newly created engine instance entity in the database.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineInstance'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /engine-instances/{id}:
    parameters:
      - name: id
        description: Engine instance ID
        in: path
        required: true
        schema:
          type: integer
    get:
      tags:
        - Engine instances
      security:
        - bearer: [ ]
      summary: Show the details of an engine instance
      description: |
        Returns a single engine instance.

        Required permissions: `MANAGE_ENGINES|TRANSLATE|SYSTEM_ADMINISTRATOR`

        A translation API key can also be used for authentication.
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineInstance'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
        502:
          $ref: '#/components/responses/502BadGateway'
    delete:
      tags:
        - Engine instances
      security:
        - bearer: [ ]
      summary: Delete an engine instance
      description: |
        Removes a deployed engine instance.

        Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`
      responses:
        204:
          $ref: '#/components/responses/204NoContent'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
        502:
          $ref: '#/components/responses/502BadGateway'
  /groups:
    get:
      tags:
        - Groups
      security:
        - bearer: [ ]
      summary: List groups
      description: Returns a collection of groups the authenticated user is a member of.
      parameters:
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - name:asc
              - name:desc
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /jobs/languagestraining:
    get:
      tags:
        - Training Languagesjobs
      securitysummary: List training jobs
     - bearerdescription: [|
]       summary: List languages
      description: |Required permission: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`
       security:
Returns a collection of languages used in Globalese. - bearer: [ ]
     A translation API key can also be used for authentication. parameters:
        -   parameters:$ref: '#/components/parameters/engineIds'
        - $ref: '#/components/parameters/languageUsagegroupIds'
        - $ref: '#/components/parameters/limitlimitMax100'
        - $ref: '#/components/parameters/offset'

     responses:   - name: sort
   200:           descriptionin: OKquery
          contentschema:
            application/jsontype: string
             schemaenum:
                $ref: '#/components/schemas/LanguageCollection'- timestamps.created_at:asc
         401:           $ref: '#/components/responses/401Unauthorized'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /segment-translation-dispatchers:
    get:
      tags:
        - Segment translation dispatchers
      security:
        - bearer: [ ]
      summary: List segment translation dispatchers
      description: |
        Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`- timestamps.created_at:desc
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoteDispatcherCollectionTrainingJobCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      502tags:
        - Training jobs
  $ref: '#/components/responses/502BadGateway'
components    security:
  parameters:     corpusCatServerId:  - bearer: [ ]
 name: cat.server.id    summary: Create a in:training queryjob
      description: |
        Required The ID ofpermission: `MANAGE_ENGINES` in the CATgroup serverthe theengine corpusbelongs isto, associated with.or `SYSTEM_ADMINISTRATOR`
      schemarequestBody:
        type$ref: number'#/components/requestBodies/CreateTrainingJob'
        exampleresponses: 10
    corpusIdInPath:    201:
  name: corpusId       description: CorpusTraining IDjob created
     in: path    content:
  required: true       schema:   application/json:
     type: string         exampleschema: 5b04a7263fa509.a4444794
    engineId:       name: engine_id    $ref: '#/components/schemas/TrainingJob'
 in: query       description400:
|         Engine ID for filtering.$ref: '#/components/responses/400BadRequest'
         Examples: `1`, `2`
    401:
 schema:         $ref: '#/components/schemasresponses/engineId401Unauthorized'
    engineIdInPath:    402:
  name: engineId       indescription: queryLicense does not allow new training jobs required:to truebe created
     schema:   403:
     type: integer    $ref: '#/components/responses/403Forbidden'
   example:     409:
     5     engineIdsdescription: Engine is already being  trained
name: engine_ids       in500:
query       description: |  $ref: '#/components/responses/500InternalServerError'
     One or more engine ID(s) for filtering, comma-separated. 502:
            Examples: `1`, `1,3,5`$ref: '#/components/responses/502BadGateway'
        schema504:
        oneOf:  $ref: '#/components/responses/504GatewayTimeout'
  /jobs/training/{id}:
    - typeparameters:
integer      - name: id
  - type: string     engineStatusesdescription: Training job  ID
  name: statuses     in: path
in: query       descriptionrequired: |true
        Oneschema:
or more engine statuses for filtering, comma-separated.    type: integer
    Examples: `trained`, `queued,training`get:
      schematags:
        type:- stringTraining jobs
       enumsecurity:
 
        - changedbearer: []
      summary: Show the -details errorof a training job
      description: -|
queued        Required permission: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`
- trained     responses:
     - training  200:
        - tuned description: OK
        - tuning content:
         - untrained  application/json:
  groupIds:       name: group_ids    schema:
  in: query       description: |     $ref: '#/components/schemas/TrainingJob'
  One or more group ID(s) for filtering, comma-separated.400:
          Examples: `1`, `1,3,5`$ref: '#/components/responses/400BadRequest'
        schema401:
        oneOf:  $ref: '#/components/responses/401Unauthorized'
       - type403:
integer           - type: string$ref: '#/components/responses/403Forbidden'
        style404:
form       explode: false  $ref: '#/components/responses/404NotFound'
 languageUsage:       name500:
usage       in: query       description: |$ref: '#/components/responses/500InternalServerError'
  /jobs/translation:
    get:
      tags:
        - Translation jobs
      summary: List translation jobs
      description: |
        Required permission: `MANAGE_PROJECTS|SYSTEM_ADMINISTRATOR`
      security:
        - bearer: [ Filter]
for languages used in Globalese.  parameters:
       Optionally, the- `:source` or `:target` modifier may be appended to the parameter value to filter for languages used on the source or target language side only.

        `usage=engines:source` will return a list of languages used as engine source languages.

        `usage=engines` will return a list of languages used as engine languages, either source or target.
      schema:
        type: string
        enum:
          - engines
    limit:
      name: limit
      in: query
      description: |
        Limit for results. *May* be used together with `offset`.

        Examples: `25`, `50`
      schema:
        type: integer
    limitMax100:
      name: limit
      in: query
      description: |
        Limit for results. It cannot be greater than 100. *May* be used together with `offset`.

        Examples: `25`, `50`

        If not provided, it will automatically be set to 100.
      schema:
        type: integer
    metadataClient:
      name: metadata.client
      in: query
      description: |
        Client metadata descriptor.

        Examples: `Very Important Client`
      schema:
        type: string
    metadataDescription:
      name: metadata.description
      in: query
      description: |
        Description metadata descriptor.

        Examples: `used for 2018 campaign`
      schema:$ref: '#/components/parameters/fileIds'
        - $ref: '#/components/parameters/groupIds'
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - timestamps.created_at:asc
              - timestamps.created_at:desc
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationJobCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      tags:
        - Translation jobs
      security:
        - bearer: [ ]
      summary: Create a translation job
      description: |
        Required permission: `MANAGE_PROJECTS` in the group the file (and project) belongs to, or `SYSTEM_ADMINISTRATOR`

        If the engine is not published, it can be used for document translation only by users with at least one of the following permissions:
          - `MANAGE_ENGINES` for the group the engine belongs to
          - `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/CreateTranslationJob'
      responses:
        201:
          description: Translation job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationJob'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        402:
          description: License does not allow new translation jobs to be created
        403:
          $ref: '#/components/responses/403Forbidden'
        409:
          description: File is already being translated
        500:
          $ref: '#/components/responses/500InternalServerError'
        502:
          $ref: '#/components/responses/502BadGateway'
        504:
          $ref: '#/components/responses/504GatewayTimeout'
  /jobs/translation/{id}:
    parameters:
      - name: id
        description: Translation job ID
        in: path
        required: true
        schema:
          type: integer
    get:
      tags:
        - Translation jobs
      security:
        - bearer: []
      summary: Show the details of a translation job
      description: |
        Required permission: `MANAGE_PROJECTS|SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationJob'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /languages:
    get:
      tags:
        - Languages
      security:
        - bearer: [ ]
      summary: List languages
      description: |
        Returns a collection of languages used in Globalese.

        A translation API key can also be used for authentication.
      parameters:
        - $ref: '#/components/parameters/languageUsage'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguageCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /projects:
    post:
      tags:
        - Projects
      security:
        - bearer: [ ]
      summary: Create a new project
      description: |
        One of either `engine_id` or `stock_engine_uuid` is required.

        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`

        Required permissions to set engine version: `MANAGE_ENGINES` and `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/CreateProject'
      responses:
        201:
          description: Project created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /projects/{projectId}:
    parameters:
      - $ref: '#/components/parameters/projectIdInPath'
    get:
      tags:
        - Projects
      security:
        - bearer: [ ]
      summary: Show the details of a project
      description: |
        Returns a single project.

        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    patch:
      tags:
        - Projects
      security:
        - bearer: [ ]
      summary: Update a project
      description: |
        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`

        Required permissions to change engine version: `MANAGE_ENGINES` and `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/UpdateProject'
      responses:
        200:
          description: Project updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    delete:
      tags:
        - Projects
      security:
        - bearer: [ ]
      summary: Delete a project
      description: |
        Deletes a project as well as all the project files contained within.

        Required permission: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        204:
          $ref: '#/components/responses/204NoContent'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /projects/{projectId}/files:
    parameters:
      - $ref: '#/components/parameters/projectIdInPath'
    get:
      tags:
        - Project files
      security:
        - bearer: [ ]
      summary: List project files
      description: |
        Returns a collection of project files.

        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      parameters:
        - $ref: '#/components/parameters/stringIds'
        - $ref: '#/components/parameters/fileStatuses'
        - $ref: '#/components/parameters/limitMax100'
        - $ref: '#/components/parameters/offset'
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - name:asc
              - name:desc
              - latest_events.translation_finished.timestamp:asc
              - latest_events.translation_finished.timestamp:desc
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    post:
      tags:
        - Project files
      security:
        - bearer: [ ]
      summary: Upload new project files
      description: |
        Only one file can be uploaded at the same time.
        A file can be uploaded as a ZIP. The ZIP may contain more files, but the formats of these files must be the same.

        The HTTP Content-Disposition header must contain the `filename` directive. Most often it happens automatically.
        E.g. `Content-Disposition: form-data; name="file"; filename="example.xliff"`

        Required permissions: `MANAGE_PROJECTS` in the groups the project belongs to, or `SYSTEM_ADMINISTRATOR`
      requestBody:
        $ref: '#/components/requestBodies/CreateFile'
      responses:
        201:
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - files
                properties:
                  files:
                    type: array
                    items:
                      $ref: '#/components/schemas/File'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /projects/{projectId}/files/{fileId}:
    parameters:
      - $ref: '#/components/parameters/projectIdInPath'
      - $ref: '#/components/parameters/fileIdInPath'
    get:
      tags:
        - Project files
      security:
        - bearer: [ ]
      summary: Show the details of a project file
      description: |
        Returns a single project file.

        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
    delete:
      tags:
        - Project files
      security:
        - bearer: [ ]
      summary: Delete a project file
      description: |
        Delete a project file.

        Required permission: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        204:
          $ref: '#/components/responses/204NoContent'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /projects/{projectId}/translated-files:
    parameters:
      - $ref: '#/components/parameters/projectIdInPath'
      - name: files
        in: query
        schema:
          type: string
        description: |
          One or more file IDs to include in the downloaded zip file.

          Examples: `5b04a7263fa509.a4444794`, `5b04a7263fa509.a4444794,5b0412363fa5c1.a4354792`
    get:
      tags:
        - Project files
      security:
        - bearer: [ ]
      summary: Download translated project files
      description: |
        Returns a zip file containing all or the specified translated files.
        Untranslated files are not returned, even if their IDs are specified in the request.

        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        200:
          $ref: '#/components/responses/200OctetStream'
        400:
          $ref: '#/components/responses/400BadRequest'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /projects/{projectId}/files/{fileId}/translated-file:
    parameters:
      - $ref: '#/components/parameters/projectIdInPath'
      - $ref: '#/components/parameters/fileIdInPath'
    get:
      tags:
        - Project files
      security:
        - bearer: [ ]
      summary: Download a translated project file
      description: |
        Required permissions: `MANAGE_PROJECTS` in the group the project belongs to, or `SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                example: >-
                  <?xml version='1.0'?><xliff>[file content]</xliff>
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        404:
          $ref: '#/components/responses/404NotFound'
        500:
          $ref: '#/components/responses/500InternalServerError'
  /segment-translation-dispatchers:
    get:
      tags:
        - Segment translation dispatchers
      security:
        - bearer: [ ]
      summary: List segment translation dispatchers
      description: |
        Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoteDispatcherCollection'
        401:
          $ref: '#/components/responses/401Unauthorized'
        403:
          $ref: '#/components/responses/403Forbidden'
        500:
          $ref: '#/components/responses/500InternalServerError'
        502:
          $ref: '#/components/responses/502BadGateway'
components:
  parameters:
    corpusCatServerId:
      name: cat.server.id
      in: query
      description: |
        The ID of the CAT server the corpus is associated with.
      schema:
        type: number
        example: 10
    corpusIdInPath:
      name: corpusId
      description: Corpus ID
      in: path
      required: true
      schema:
        type: string
        example: 5b04a7263fa509.a4444794
    engineId:
      name: engine_id
      in: query
      description: |
        Engine ID for filtering.

        Examples: `1`, `2`
      schema:
        $ref: '#/components/schemas/engineId'
    engineIdInPath:
      name: engineId
      in: path
      required: true
      schema:
        type: integer
        example:
          5
    engineIds:
      name: engine_ids
      in: query
      description: |
        One or more engine ID(s) for filtering, comma-separated.

        Examples: `1`, `1,3,5`
      schema:
        oneOf:
          - type: integer
          - type: string
    engineStatuses:
      name: statuses
      in: query
      description: |
        One or more engine statuses for filtering, comma-separated.

        Examples: `trained`, `queued,training`
      schema:
        type: string
        enum:
          - changed
          - error
          - queued
          - trained
          - training
          - tuned
          - tuning
          - untrained
    fileIdInPath:
      name: fileId
      description: Project file ID
      in: path
      required: true
      schema:
        type: string
        example: 5b04a7263fa509.a4444794
    fileIds:
      name: file_ids
      in: query
      description: |
        One or more file ID(s) for filtering, comma-separated.

        Examples: `5b04a7263fa509.a4444794`, `5b04a7263fa509.a4444794,5b04a7199fa509.a4444401`
      schema:
        - type: string
    fileStatuses:
      name: statuses
      in: query
      description: |
        One or more file statuses for filtering, comma-separated.

        Examples: `new`, `translating,translated`
      schema:
        type: string
        enum:
          - empty
          - new
          - queued
          - translated
          - translating
    groupIds:
      name: group_ids
      in: query
      description: |
        One or more group ID(s) for filtering, comma-separated.

        Examples: `1`, `1,3,5`
      schema:
        oneOf:
          - type: integer
          - type: string
      style: form
      explode: false
    languageUsage:
      name: usage
      in: query
      description: |
        Filter for languages used in Globalese.

        Optionally, the `:source` or `:target` modifier may be appended to the parameter value to filter for languages used on the source or target language side only.

        `usage=engines:source` will return a list of languages used as engine source languages.

        `usage=engines` will return a list of languages used as engine languages, either source or target.
      schema:
        type: string
        enum:
          - engines
    limit:
      name: limit
      in: query
      description: |
        Limit for results. *May* be used together with `offset`.

        Examples: `25`, `50`
      schema:
        type: integer
    limitMax100:
      name: limit
      in: query
      description: |
        Limit for results. It cannot be greater than 100. *May* be used together with `offset`.

        Examples: `25`, `50`

        If not provided, it will automatically be set to 100.
      schema:
        type: integer
        example: 25
    metadataClient:
      name: metadata.client
      in: query
      description: |
        Client metadata descriptor.

        Examples: `Very Important Client`
      schema:
        type: string
    metadataDescription:
      name: metadata.description
      in: query
      description: |
        Description metadata descriptor.

        Examples: `used for 2018 campaign`
      schema:
        type: string
    metadataDomain:
      name: metadata.domain
      in: query
      description: |
        Domain metadata descriptor.

        Examples: `legal`
      schema:
        type: string
    metadataProject:
      name: metadata.project
      in: query
      description: |
        Project metadata descriptor.

        Examples: `0192 EC Project`
      schema:
        type: string
    metadataSubject:
      name: metadata.subject
      in: query
      description: |
        Subject metadata descriptor.

        Examples: `EU treaties`
      schema:
        type: string
    numericalIds:
      name: ids
      in: query
      description: |
        One or more ID(s) for filtering, comma-separated.

        Examples: `3`, `3,4`
      schema:
        type: string
      style: form
      explode: false
    offset:
      name: offset
      in: query
      description: |
        Offset to start query from. **Must** be used together with `limit`.

        Examples: `50`, `100`
      schema:
        type: integer
        example: 0
    projectIdInPath:
      name: projectId
      description: Project ID
      in: path
      required: true
      schema:
        type: integer
        example: 5
    sourceLanguage:
      name: source_language
      in: query
      description: |
        Source language.

        Examples: `en`, `fr`
      schema:
        type: string
    stringIds:
      name: ids
      in: query
      description: |
        One or more ID(s) for filtering, comma-separated.

        Examples: `5b04a7263fa509.a4444794`, `5b04a7263fa509.a4444794,5b0412363fa5c1.a4354792`
      schema:
        type: string
      style: form
      explode: false
    targetLanguage:
      name: target_language
      in: query
      description: |
        Target language.

        Examples: `en`, `fr`
      schema:
        type: string
  requestBodies:
    CreateCorpus:
      content:
        multipart/form-data:
          schema:
            $ref: '#/components/schemas/CreateCorpus'
    CreateEngine:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateEngine'
      required: true
    CreateEngineInstance:
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - engine_id
              - dispatcher_id
            properties:
              engine_id:
                $ref: '#/components/schemas/engineId'
              dispatcher_id:
                $ref: '#/components/schemas/dispatcherId'
    CreateFile:
      content:
        multipart/form-data:
          schema:
            $ref: '#/components/schemas/CreateFile'
    CreateProject:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateProject'
    CreateTrainingJob:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateTrainingJob'
    CreateTranslationJob:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateTranslationJob'
    UpdateCorpus:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateCorpus'
    UpdateCorpusContent:
      content:
        multipart/form-data:
          schema:
            $ref: '#/components/schemas/UpdateCorpusContent'
    UpdateEngine:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateEngine'
    UpdateProject:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateProject'
  responses:
    200OctetStream:
      description: OK
      content:
        application/octet-stream:
          schema:
            type: string
            format: binary
    204NoContent:
      description: No Content
    400BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    401Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    403Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    404NotFound:
      description: Resource not found
    422UnprocessableEntity:
      description: Unprocessable entity
    500InternalServerError:
      description: Internal server error while processing the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    502BadGateway:
      description: Bad Gateway
    504GatewayTimeout:
      description: Gateway Timeout
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key
  schemas:
    catToolServerId:
      description: CAT tool server ID in Globalese
      type: integer
      example: 10
    catToolServerType:
      type: string
      enum:
        - memoq
        - memsource
        - smartcat
        - xtm
    CollectionMetadata:
      type: object
      required:
        - counts
      properties:
        counts:
          type: object
          required:
            - total
            - filtered
          properties:
            total:
              description: The total number of resources in the system, irrespective of any filters.
              type: integer
              example: 100
            filtered:
              description: The number of resources in the system matching the filters.
              type: integer
              example: 40
    Corpus:
      type: object
      required:
        - id
        - actions
        - cat
        - counts
        - current_version
        - engines
        - format
        - groups
        - metadata
        - name
        - source_language
        - target_language
      properties:
        id:
          $ref: '#/components/schemas/corpusId'
        actions:
          $ref: '#/components/schemas/CorpusActions'
        cat:
          $ref: '#/components/schemas/CorpusCat'
        counts:
          $ref: '#/components/schemas/CorpusCounts'
        current_version:
          $ref: '#/components/schemas/corpusVersion'
        engine_ids:
          type: array
          items:
            type: integer
          example: [ 2, 8, 14 ]
        format:
          $ref: '#/components/schemas/corpusFormat'
        group_ids:
          $ref: '#/components/schemas/corpusGroupIds'
        metadata:
          $ref: '#/components/schemas/CorpusMetadata'
        name:
          $ref: '#/components/schemas/corpusName'
        source_language:
          $ref: '#/components/schemas/sourceLanguage'
        target_language:
          $ref: '#/components/schemas/targetLanguage'
    CorpusActions:
      type: object
      description: An object describing the actions possible against a corpus.
      required:
        - delete
        - update
      properties:
        delete:
          type: boolean
        update:
          type: boolean
    CorpusCat:
      type: object
      nullable: true
      description: |
        If the corpus was created by retrieving a CAT tool server corpus, this object contains relevant information.
      required:
        - corpus
        - server
      properties:
        corpus:
          $ref: '#/components/schemas/CorpusCatCorpus'
        server:
          $ref: '#/components/schemas/CorpusCatServer'
    CorpusCatCorpus:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/remoteCorpusId'
    CorpusCatServer:
      type: object
      required:
        - id
        - type
      properties:
        id:
          $ref: '#/components/schemas/catToolServerId'
        type:
          $ref: '#/components/schemas/catToolServerType'
    CorpusCollection:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Corpus'
        meta:
          $ref: '#/components/schemas/CollectionMetadata'
    CorpusContent:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            type: object
            required:
              - id
              - content
            properties:
              id:
                type: string
                example: "1"
                nullable: true
              content:
                type: object
                required:
                  - source
                  - target
                properties:
                  source:
                    type: string
                  target:
                    type: string
        meta:
          $ref: '#/components/schemas/CollectionMetadata'
    CorpusCounts:
      type: object
      required:
        - segment_count
        - source_word_count
        - target_word_count
        - source_character_count
        - target_character_count
      properties:
        segment_count:
          type: integer
          example: 145952
        source_word_count:
          type: integer
          example: 2819806
        target_word_count:
          type: integer
          example: 3120176
        source_character_count:
          type: integer
          example: 24235334
        target_character_count:
          type: integer
          example: 29194748
    CorpusEvent:
      allOf:
        - $ref: '#/components/schemas/Event'
        - type: object
          properties:
            resource_id:
              $ref: '#/components/schemas/corpusId'
            type:
              type: string
              enum:
                - uploaded
                - updated
                - new_version_uploaded
    CorpusEventCollection:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CorpusEvent'
        meta:
          $ref: '#/components/schemas/CollectionMetadata'
    corpusFormat:
      type: string
      enum:
        - csv-comma
        - csv-memoq
        - csv-semicolon
        - tmx
        - tbx
        - tsv
        - xliff
        - xliff-memoq
        - xliff-memsource
        - xliff-sdl
        - xliff-smartcat
        - xliff-translate5
        - xliff-wordbee
        - xliff-xtm
    corpusGroupIds:
      type: array
      description: |
        Cannot be empty.
        A corpus must always be assigned to at least one group.
      items:
        type: integer
      example: [ 1, 3 ]
    corpusId:
      description: Corpus ID
      type: string
      example: 5a0ba1267f0571.04642701
    CorpusMetadata:
      type: object
      properties:
        domain:
          type: string
          nullable: true
          example: legal
        subject:
          type: string
          nullable: true
          example: EU treaties
        client:
          type: string
          nullable: true
          example: Very Important Client
        project:
          type: string
          nullable: true
          example: 0192 EC Project
        description:
          type: string
          nullable: true
          example: created by DGT
    corpusName:
      type: string
      example: English to German DGT.tmx
    CorpusVersion:
      type: object
      required:
        - corpus_id
        - version
        - counts
        - engine_ids
        - timestamps
      properties:
        corpus_id:
          $ref: '#/components/schemas/corpusId'
        version:
          $ref: '#/components/schemas/corpusVersion'
        counts:
          $ref: '#/components/schemas/CorpusCounts'
        engine_ids:
          $ref: '#/components/schemas/CorpusVersionEngineIds'
        timestamps:
          $ref: '#/components/schemas/CorpusVersionTimestamps'
    corpusVersion:
      type: integer
      example: 1
    CorpusVersionCollection:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CorpusVersion'
        meta:
          $ref: '#/components/schemas/CollectionMetadata'
    CorpusVersionEngineIds:
      type: array
      items:
        type: integer
      example: [ 2, 8, 14 ]
    CorpusVersionTimestamps:
      type: object
      required:
        - created_at
      properties:
        created_at:
          $ref: '#/components/schemas/createdAt'
    CreateCorpus:
      type: object
      required:
        - file
        - format
        - group_ids[]
      properties:
        file:
          type: object
        format:
          $ref: '#/components/schemas/corpusFormat'
        group_ids[]:
          $ref: '#/components/schemas/groupId'
        source_language:
          $ref: '#/components/schemas/sourceLanguage'
        target_language:
          $ref: '#/components/schemas/targetLanguage'
        metadata[domain]:
          type: string
          example: legal
        metadata[subject]:
          type: string

   metadataDomain:       nameexample: metadata.domainEU treaties
     in: query  metadata[client]:
    description: |     type: string
  Domain metadata descriptor.      example: Very Important Client
Examples: `legal`       schema:metadata[project]:
          type: string
    metadataProject:       nameexample: metadata.project0192 EC Project
    in: query       description: |metadata[description]:
          Projecttype: metadatastring
descriptor.          Examplesexample: created `0192by ECDGT
Project`    CreateEngine:
  schema:    type: object
   type: string  required:
  metadataSubject:      - name:
metadata.subject       in: query- source_language
     description: |  - target_language
     Subject metadata descriptor. - group_id
       Examples: `EU- treaties`resources
      schemaproperties:
        typename:
string     numericalIds:     type: string
name: ids       in: query example: Engine 1
   description: |    source_language:
    One or more ID(s) for filtering, comma-separated.
 $ref: '#/components/schemas/sourceLanguage'
        Examplestarget_language:
`3`, `3,4`       schema:  $ref: '#/components/schemas/targetLanguage'
     type: string  group_id:
    style: form       explode: false$ref: '#/components/schemas/groupId'
     offset:    resources:
  name: offset       in$ref: query'#/components/schemas/CreateEngineResources'
    CreateEngineResources:
 description: |    type: object
   Offset to start queryrequired:
from. **Must** be used together with `limit`.  - corpus_ids
      Examplesproperties:
`50`, `100`       schemacorpus_ids:
        type: integer $ref: '#/components/schemas/CreateEngineResourcesCorpusIds'
  sourceLanguage:       namestock_corpora:
source_language       in: query  type: boolean
   description: |      description: Whether or Sourcenot language.to use available stock corpora for training the engine.
 Examples: `en`, `fr`       schema:
stock_engine_uuid:
       type: string     stringIds$ref: '#/components/schemas/nullableStockEngineUuid'
     nameCreateEngineResourcesCorpusIds:
ids       intype: queryobject
      description: |
     required:
  One or more ID(s) for filtering, comma-separated. core
        Examplesproperties:
`5b04a7263fa509.a4444794`, `5b04a7263fa509.a4444794,5b0412363fa5c1.a4354792`       schemacore:
          type: stringarray
      style: form   items:
   explode: false     targetLanguage:   type: string
  name: target_language       in: query
example: [ '51fc7ea3fa889.b0027797', '54018363fa5c1.044227af' ]
     description: |  auxiliary:
      Target language.   type: array
     Examples: `en`, `fr`   items:
   schema:         type: string
    requestBodies:      CreateCorpus:
 example: [ '5b04a7263fa509.77444794', '5b0412363fa5c1.c4354792' ]
    contentcreatedAt:
      description:  multipart/form-data:
   Created timestamp in ISO 8601 format
      schematype: string
      example: "2017-08-30T04:34:26+00:00"
    $refCreateFile: '#/components/schemas/CreateCorpus'
      CreateEnginetype: object
      contentrequired:
        - file
 application/json:       - format
  schema:    properties:
        $reffile: '#/components/schemas/CreateEngine'
          requiredtype: object
true     CreateEngineInstance:   format:
   required: true       content:$ref: '#/components/schemas/fileFormat'
    CreateProject:
   application/json:   type: object
      schemarequired:
        - name
  type: object     - source_language
      required:      - target_language
        - enginegroup_id
      properties:
       - dispatcher_idname:
          type: string
properties:          example: Project 1
  engine_id:      source_language:
          $ref: '#/components/schemas/engineIdsourceLanguage'
              dispatcher_id:
     target_language:
          $ref: '#/components/schemas/dispatcherIdtargetLanguage'
    UpdateCorpus:    group_id:
  content:         application/json:$ref: '#/components/schemas/groupId'
          schema:
 engine_id:
          $ref: '#/components/schemas/UpdateCorpusnullableEngineId'
        UpdateCorpusContent:engine_version:
          content:$ref: '#/components/schemas/nullableEngineVersion'
        multipart/form-datastock_engine_id:
          schemaallOf:
            - $ref: '#/components/schemas/UpdateCorpusContentnullableStockEngineUuid'
      UpdateEngine:      - requireddeprecated: true
        content:stock_engine_uuid:
          application/json$ref: '#/components/schemas/nullableStockEngineUuid'
         schemacat:
 
          $ref: '#/components/schemas/UpdateEngineCreateProjectCat'

 responses:     204NoContentCreateProjectCat:
      descriptiontype: object
No Content     400BadRequestrequired:
      description: Bad Request- server
     content:   - project
    application/json:  properties:
        schemaserver:
 
          $ref: '#/components/schemas/ErrorCreateProjectCatServer'
    401Unauthorized:    project:
  description: Unauthorized       content:$ref: '#/components/schemas/CreateProjectCatProject'
    CreateProjectCatServer:
   application/json:   type: object
      schemarequired:
        - id
  $ref: '#/components/schemas/Error'   properties:
 403Forbidden:       descriptionid:
  Insufficient permissions       contenttype: integer
       application/json:   description: CAT tool server connection ID as stored schema:in Globalese.
           $refexample: '#/components/schemas/Error'2
    404NotFoundCreateProjectCatProject:
      descriptiontype: Resourceobject
not found     422UnprocessableEntityrequired:
        - description:id
Unprocessable entity     500InternalServerErrorproperties:
       description id:
  Internal server error while processing the request  oneOf:
    content:        - application/json:type: integer
            - schematype: string
          description: CAT tool project $ref: '#/components/schemas/Error'
    502BadGateway:
ID as stored on the CAT tool server.
     description: Bad Gateway   securitySchemes:example: 5987c27a-da1e-4060-b08d-00aa6dbd0bba
    bearerCreateTrainingJob:
      type: httpobject
      schemerequired:
  bearer      - description:engine_id
API key   schemas:    - catToolServerId:mode
      descriptionproperties: CAT
tool server ID in Globalese    engine_id:
  type: integer       example$ref: 10'#/components/schemas/engineId'
    catToolServerType:    mode:
  type: string       enumtype: string
       - memoq  enum:
      - memsource     - training
  - smartcat         - xtmtuning
    CollectionMetadataCreateTranslationJob:
      type: object
      required:
        - countsfile_id
      properties:
        countsfile_id:
          type$ref: object'#/components/schemas/fileId'
          requireddispatcherId:
      description: Segment-based translation dispatcher ID
 - total    type: integer
      example: -1
filtered    dispatcherRegion:
      propertiestype: string
      example: "europe-west1"
    totaldispatcherUrl:
      type: string
      description: The total number of resources in the system, irrespective of any filters.example: "https://dispatcher-europe-west1-ja6vheawuq-ew.a.run.app"
    Engine:
      type: object
      required:
  type: integer     - id
        example:- 100actions
        - counts
  filtered:      - group_id
       description: The- numberhealth
of resources in the system matching the filters. - instance_ids
        - name
  type: integer     - published
        example: 40- source_language
    Corpus:    - status
 type: object      - required:stock_corpora
        - stock_engine_id
        - actionsstock_engine_uuid
        - cattarget_language
        - countstimestamps
        - enginesuuid
        - version
 format     properties:
   - groups    id:
    - metadata     $ref: '#/components/schemas/engineId'
  - name     actions:
   - source_language      $ref: '#/components/schemas/EngineActions'
 - target_language      counts:
  - version       properties:$ref: '#/components/schemas/EngineCounts'
        group_id:
          $ref: '#/components/schemas/corpusIdgroupId'
        actionshealth:
          $ref: '#/components/schemas/CorpusActionsengineHealth'
        catinstance_ids:
          $reftype: '#/components/schemas/CorpusCat' array
          countsitems:
            $ref: '#/components/schemas/CorpusCountsnumericalId'
        engine_idsname:
          type: arraystring
          items:example: Engine 1
        published:
          type: integerboolean
          example: [ 2, 8, 14 ]true
           formatsource_language:
          $ref: '#/components/schemas/corpusFormatsourceLanguage'
        group_idsstatus:
          $ref: '#/components/schemas/corpusGroupIds'engineStatus'
        stock_corpora:
          metadata:
 type: boolean
          example: true
        $refstock_engine_id: '#/components/schemas/CorpusMetadata'
          nameallOf:
            - $ref: '#/components/schemas/corpusName'nullableStockEngineUuid'
            - deprecated: true
        sourcestock_engine_languageuuid:
          $ref: '#/components/schemas/sourceLanguagenullableStockEngineUuid'
        target_language:
          $ref: '#/components/schemas/targetLanguage'
        versiontimestamps:
          $ref: '#/components/schemas/corpusVersionEngineTimestamps'
    CorpusActions:    uuid:
  type: object       description$ref: An object describing the actions possible against a corpus.
'#/components/schemas/uuid'
        version:
     required:     type: string
  - delete       nullable: true
- update       properties:  example: 3.5.5
     delete:
   EngineActions:
      type: object
boolean      description: An object update:describing the actions possible against an engine.
    type: boolean required:
   CorpusCat:     - delete
type: object       nullable:- truedeploy
      description: | - train
      If the corpus- wastranslate
created by retrieving a CAT tool server corpus, this- objecttune
contains relevant information.      - required:update
      properties:
 - corpus      delete:
  - server       propertiestype: boolean
        corpusdeploy:
          $reftype: '#/components/schemas/CorpusCatCorpus'boolean
        servertrain:
          $reftype: '#/components/schemas/CorpusCatServer' boolean
        CorpusCatCorpustranslate:
      type: object   type: boolean
  required:      tune:
  - id       propertiestype: boolean
        idupdate:
          $reftype: '#/components/schemas/remoteCorpusId'boolean
    CorpusCatServerEngineCollection:
      type: object
      required:
        - iddata
        - typemeta
      properties:
        iddata:
          $reftype: '#/components/schemas/catToolServerId' array
          typeitems:
            $ref: '#/components/schemas/catToolServerTypeEngine'
    CorpusCollection:    meta:
  type: object       required:$ref: '#/components/schemas/CollectionMetadata'
    EngineCorpusIdWithVersion:
   - data  type: object
     - metarequired:
      properties:  - id
     data:   - version
      typeproperties:
array           items:
 id:
          $ref: '#/components/schemas/CorpuscorpusId'
        metaversion:
          $ref: '#/components/schemas/CollectionMetadatacorpusVersion'
    CorpusContentEngineCounts:
      type: object
      required:
        - corpora
data      properties:
  - meta     corpora:
 properties:         datatype: object
          typerequired:
array           items: - core
          type: object - auxiliary
          requiredproperties:
            core:
 - id            type:  object
- content             properties:
                idsegment_count:
                  type: stringnumber
            auxiliary:
   example: "1"          type: object
     nullable: true        properties:
      content:          segment_count:
      type: object           type: number
    requiredEngineEvent:
      allOf:
        - $ref: '#/components/schemas/Event'
   - source    - type: object
          required:
 - target          - note
     properties:       - error_code
          sourceproperties:
            error_code:
        type: string     $ref: '#/components/schemas/errorCode'
            targetnote:
              $ref: '#/components/schemas/engineEventNote'
      type: string     resource_id:
   meta:           $ref: '#/components/schemas/CollectionMetadataengineId'
     CorpusCounts:       type:
 object       required:      type: string
 - segment_count         - source_word_count  enum:
      - target_word_count         - source_character_countcreated
        - target_character_count       properties: - deleted
      segment_count:           type: integer- instance_deployment_failed
           example: 145952    - instance_deployment_finished
   source_word_count:           type: integer  - instance_deployment_started
       example: 2819806        - targetinstance_wordremoval_count:failed
          type: integer     - instance_removal_finished
    example: 3120176         source_character_count:  - instance_removal_started
       type: integer        - instance_removal_started_by_billing
 example: 24235334         target_character_count:     - published
    type: integer           example: 29194748
    CorpusEvent:- stock_engine_removed
       allOf:         - $ref: '#/components/schemas/Event'
training_cancelled
       - type: object           properties:
- training_failed
           resource_id:     - training_finished
        $ref: '#/components/schemas/corpusId'       - training_started
    type:            - tuning_failed
 type: string              - enum:tuning_finished
                - uploadedtuning_started
                - updatedunpublished
                - new_version_uploadedupdated
    CorpusEventCollectionEngineEventCollection:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CorpusEventEngineEvent'
        meta:
          $ref: '#/components/schemas/CollectionMetadata'
    corpusFormatengineHealth:
      type: string
      nullable: true
      enum:
        - csv-commacurrent
        - csv-memoqdeprecated
        - csv-semicolonsupported
        - tmxunsupported
    engineId:
   - tbx  description: Engine ID
    - tsv type: integer
      -example: xliff10
    EngineInstance:
   - xliff-memoq  type: object
     - xliff-memsourcerequired:
        - xliff-sdlid
        - xliff-smartcatengine_id
        - xliff-translate5dispatcher_url
        - status
xliff-wordbee      properties:
  - xliff-xtm     corpusGroupIdsid:
          type: array$ref: '#/components/schemas/numericalId'
        description: |engine_id:
          $ref: '#/components/schemas/engineId'
  Cannot be empty.    dispatcher_url:
    A corpus must always be assigned to at least one group.$ref: '#/components/schemas/dispatcherUrl'
        itemsstatus:
        type: integer $ref: '#/components/schemas/engineInstanceStatus'
    exampleEngineInstanceCollection: [ 1,
3 ]     corpusIdtype: object
      descriptionrequired:
Corpus ID       type:- stringdata
      example: 5a0ba1267f0571.04642701 - meta
  CorpusMetadata:    properties:
  type: object     data:
 properties:         domaintype: array
          typeitems:
 string           nullable: true$ref: '#/components/schemas/EngineInstance'
        meta:
  example: legal       $ref:  subject:'#/components/schemas/CollectionMetadata'
    engineInstanceStatus:
      type: string
      enum:
    nullable: true   - deploying
      example: EU treaties
- error_removal_engine_manager_internal_error
       client: - error_removal_engine_manager_rejected_request
        type: string- error_removal
        - on
nullable: true       - queued
  example: Very Important Client   - removing
    projectEngineResources:
      type: object
      typerequired:
 string       - corpora
  nullable: true     - stock_corpora
    example: 0192 EC Project - stock_engine
      descriptionproperties:
        corpora:
  type: string       $ref: '#/components/schemas/EngineResourcesCorpora'
  nullable: true     stock_corpora:
     example: created by DGT  type: boolean
 corpusName:       typestock_engine:
string       example: English to German DGT.tmx$ref: '#/components/schemas/EngineResourcesStockEngine'
    CorpusVersionEngineResourcesCorpora:
      type: object
      requireddescription: An engine cannot contain more than 500 corpora -in versiontotal.
        - countsrequired:
        - engine_idscore
        - timestampsauxiliary
      properties:
        versionauxiliary:
          $reftype: '#/components/schemas/corpusVersion'
 array
      counts:           $ref: '#/components/schemas/CorpusCounts'
        engine_ids:items:
            $ref: '#/components/schemas/CorpusVersionEngineIdsEngineCorpusIdWithVersion'
        timestampscore:
          $reftype: '#/components/schemas/CorpusVersionTimestamps'array
    corpusVersion:       description: The version of the corpus
items:
     type: integer       example$ref: 1'#/components/schemas/EngineCorpusIdWithVersion'
    CorpusVersionCollectionEngineResourcesStockEngine:
      type: object
      required:
        - id
data      properties:
  - meta     id:
 properties:         data:$ref: '#/components/schemas/uuid'
    engineStatus:
      type: string
array      enum:
    items:    - changed
       $ref: '#/components/schemas/CorpusVersion'
 - error
       meta: - queued
        $ref: '#/components/schemas/CollectionMetadata'- trained
    CorpusVersionEngineIds:    - training
 type: object      - required:tuned
        - trainedtuning
        - untrained
 tuned   Error:
   properties:   type: object
    trained:  properties:
        typeerror:
array           itemstype: string
           typeexample: integer"Error message."
        required:
example: [ 2, 8, 14 ]   - error
    tunederrorCode:
      type: integer
  type: array   nullable: true
      itemsexample: 104
    engineEventNote:
      type: string
  integer    nullable: true
      example: [ 2, 8, 14 ] Updated to include proofread corpus from latest project.
    CorpusVersionTimestampsEngineTimestamps:
      type: object
      required:
        - createddeprecated_at
      properties:
        createddeprecated_at:
          $ref: '#/components/schemas/createdAtnullableTimestamp'
    CreateCorpusEvent:
      type: object
      required:
        - fileid
        - formatresource_id
        - group_ids[]
timestamp
     properties:         file:
         - type:
object        - format:user
          $ref: '#/components/schemas/corpusFormat'properties:
        group_ids[]id:
          $ref: '#/components/schemas/groupIdnumericalId'
        source_languagetimestamp:
          $ref: '#/components/schemas/sourceLanguagetimestamp'
        target_languageuser:
          $ref: '#/components/schemas/targetLanguageEventUser'
        metadata[domain]:
   EventUser:
      type: stringobject
          examplenullable: legaltrue
        metadata[subject]required:
        - id
type: string       - name
  example: EU treaties         metadata[client]properties:
          typeid:
string           example$ref: Very Important Client'#/components/schemas/userId'
         metadata[project]name:
          type: string
          example: 0192 EC Project
  $ref: '#/components/schemas/userName'
     metadata[description]File:
      type: object
  type: string   required:
       example: created- byid
DGT     CreateEngine:   - actions
  type: object     -  required:counts
        - nameformat
        - sourcegroup_languageid
        - target_languagename
        - groupproject_id
        - resourcessource_language
      properties:   - status
    name:    - target_language
     type: string  - timestamps
       exampleproperties: Engine
1         source_languageid:
          $ref: '#/components/schemas/sourceLanguagefileId'
        target_languageactions:
          $ref: '#/components/schemas/targetLanguageFileActions'
        group_idcat:
          $ref: '#/components/schemas/groupIdFileCat'
        resourcescounts:
          $ref: '#/components/schemas/CreateEngineResourcesFileCounts'
 
  CreateEngineResources:       typeformat:
object       required:   $ref: '#/components/schemas/fileFormat'
    - corpus_ids       properties:
        corpus_idsgroup_id:
          $ref: '#/components/schemas/CreateEngineResourcesCorpusIdsgroupId'
        stock_corporaname:
          type: boolean
  string
          example: Chapter 1.xliff
        descriptionproject_id:
Whether or not to use available stock corpora for training the engine.$ref: '#/components/schemas/projectId'
        stocksource_engine_idlanguage:
          $ref: '#/components/schemas/nullableStockEngineIdsourceLanguage'
    CreateEngineResourcesCorpusIds:    status:
  type: object       required$ref: '#/components/schemas/fileStatus'
       - core
  target_language:
    properties:         core$ref: '#/components/schemas/targetLanguage'
         typetimestamps:
array           items$ref: '#/components/schemas/FileTimestamps'
    FileActions:
      type: stringobject
      description: An object describing example:the [ '51fc7ea3fa889.b0027797', '54018363fa5c1.044227af' ]
 actions possible against a project file.
      auxiliaryrequired:
        - delete
 type: array      - deliver
   items:     - translate
      typeproperties: string
          example: [ '5b04a7263fa509.77444794', '5b0412363fa5c1.c4354792' ]delete:
     createdAt:       descriptiontype: Created timestampboolean
in ISO 8601 format     deliver:
 type: string       example: "2017-08-30T04:34:26+00:00"
    dispatcherId: type: boolean
        descriptiontranslate:
Segment-based translation dispatcher ID       type: integerboolean
     FileCat:
example: 1     dispatcherRegiontype: object
      typenullable: stringtrue
      exampledescription: "europe-west1"An object describing the links dispatcherUrl:to a CAT tool file.
  type: string   required:
   example: "https://dispatcher-europe-west1-ja6vheawuq-ew.a.run.app"    - Engine:file
      typeproperties:
 object       requiredfile:
         - id $ref: '#/components/schemas/FileCatFile'
    FileCatFile:
   - actions  type: object
     - countsrequired:
        - group_id
        - healthtype
        - instancecreated_idsat
        - nameupdated_at
        - publishedretrieved_at
        - sourcedelivered_languageat
      properties:
  - status     id:
   - stock_corpora      oneOf:
  - stock_engine_id         - target_languagetype: integer
       - uuid    - type: string
  - version       propertiesexample: 5678
        idtype:
          $ref: '#/components/schemas/engineIdcatToolServerType'
        actionscreated_at:
          $ref: '#/components/schemas/EngineActionstimestamp'
        countsupdated_at:
          $ref: '#/components/schemas/EngineCountsnullableTimestamp'
        groupretrieved_idat:
          $ref: '#/components/schemas/groupId'
        health:
          type: stringnullableTimestamp'
        delivered_at:
    nullable: true     $ref: '#/components/schemas/nullableTimestamp'
    enumFileCollection:
      type: object
    - current required:
        - data
 - deprecated      - meta
     - supportedproperties:
        instance_idsdata:
          type: array
          items:
            $ref: '#/components/schemas/numericalIdFile'
        namemeta:
          type: string$ref: '#/components/schemas/CollectionMetadata'
    FileCounts:
      exampletype: object
Engine 1     required:
   published:     - total
    type: boolean   - new
      exampleproperties:
true         source_languagetotal:
          $ref: '#/components/schemas/sourceLanguageSegmentableCounts'
        statusnew:
          $ref: '#/components/schemas/engineStatus'
 SegmentableCounts'
    fileFormat:
      type: string
      stock_corpora:
  enum:
        - xliff
        - xliff-idiom
        - xliff-memoq
        - xliff-memsource
        - xliff-sap
        - xliff-sdl
       type: boolean- xliff-smartcat
        - example:xliff-translate5
true         stock_engine_id:- xliff-wordbee
        - xliff-wordfast
$ref: '#/components/schemas/nullableStockEngineId'       -  target_language:xliff-xtm
    fileId:
      $refdescription: '#/components/schemas/targetLanguage'
File ID
       uuidtype: string
      example: 51fc7ea3fa889.a0027797
 $ref: '#/components/schemas/uuid'  fileStatus:
      versiontype: string
         type: stringenum:
        - empty
nullable: true       - new
  example: 3.5.5     EngineActions:- queued
     type: object  - queueing
   description: An object describing the actions- possibletranslated
against an engine.      - required:translating
    FileTimestamps:
   - delete  type: object
     - deployrequired:
        - trainuploaded_at
        - translatetranslated_at
      properties:
 - tune      uploaded_at:
  - update       properties:$ref: '#/components/schemas/timestamp'
        deletetranslated_at:
          type$ref: boolean
 '#/components/schemas/nullableTimestamp'
      deployGroup:
      type: object
  type: boolean   required:
     train:   - id
      type: boolean - name
      translateproperties:
         id:
type: boolean         tune$ref: '#/components/schemas/groupId'
        name:
type: boolean         updatetype: string
          typeexample: booleanDefault
    EngineCollectionGroupCollection:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EngineGroup'
    groupId:
      meta:description: Group ID
      type: integer
      $refexample: '#/components/schemas/CollectionMetadata'2
    EngineCorporaJobTimestamps:
      type: object
      descriptionrequired:
   An engine cannot contain more than- 500created_at
corpora in total.      - required:started_at
        - core finishing_at
      properties:
        created_at:
  - auxiliary       $ref:  - stock'#/components/schemas/createdAt'
        propertiesstarted_at:
         auxiliary: description: Timestamp of when the job started in ISO 8601 format
          type: arraystring
          itemsnullable: true
           $ref: '#/components/schemas/EngineCorpusIdWithVersion'example: "2017-08-30T04:34:26+00:00"
        corefinishing_at:
          typedescription: Timestamp arrayof when the job is estimated to finish in ISO 8601 items:format
          type: string
$ref: '#/components/schemas/EngineCorpusIdWithVersion'         stocknullable: true
          typeexample: boolean"2043-11-03T07:53:10+00:00"
    EngineCorpusIdWithVersionLanguage:
      type: object
      required:
        - id
        - version
      properties:
        id:
          $reftype: '#/components/schemas/corpusId' string
          versionexample: en-us
    LanguageCollection:
    $ref: '#/components/schemas/corpusVersion'
  type: object
  EngineCounts:     required:
 type: object      - required:data
        - corporameta
      properties:
        corporadata:
          type: objectarray
          requireditems:
            $ref: '#/components/schemas/Language'
  - core     meta:
       - auxiliary  $ref: '#/components/schemas/CollectionMetadata'
    nullableEngineId:
  properties:    description: Engine ID
      coretype: integer
      nullable: true
      typeexample: object10
    nullableEngineVersion:
         propertiesdescription: Engine version
      type: integer
      segment_countnullable: true
      example: 4
    nullableStockEngineId:
    type: number description: Stock engine ID
      nullable:  auxiliary:true
      type: integer
      typeexample: object23
    nullableStockEngineUuid:
      description: Stock engine properties:UUID
      nullable: true
      type: string
segment_count:      example: 77d3a117-43bd-401c-ab8b-75552118b2c5
    nullableTimestamp:
      type: string
 number     EngineEventnullable: true
      allOfexample: "2020-06-06T10:45:00+00:00"
    numericalId:
  - $ref: '#/components/schemas/Event'  description: ID
     - type: integer
object      example: 10
    propertiesProject:
      type: object
      error_coderequired:
        - id
     $ref: '#/components/schemas/errorCode'  - actions
        - resourceengine_id:
        - engine_version
      $ref: '#/components/schemas/engineId'
  - group_id
        - name
type:        - source_language
     type: string  - status
        - stock_engine_id
 enum:       - stock_engine_uuid
        - target_language
 created       - timestamps
      properties:
 - deleted      id:
          - instance_deployment_failed$ref: '#/components/schemas/projectId'
        actions:
       - instance_deployment_finished  $ref: '#/components/schemas/ProjectActions'
        cat:
    - instance_deployment_started     $ref: '#/components/schemas/ProjectCat'
        counts:
 - instance_removal_failed        $ref: '#/components/schemas/ProjectCounts'
       - instance_removal_finishedengine_id:
          $ref: '#/components/schemas/nullableEngineId'
       - instance_removal_startedengine_version:
          $ref: '#/components/schemas/nullableEngineVersion'
       - instance_removal_started_by_billinggroup_id:
          $ref: '#/components/schemas/groupId'
       - publishedname:
          type: string
    - stock_engine_removed     example: Project 1
        source_language:
- training_cancelled         $ref: '#/components/schemas/sourceLanguage'
      - training_failed status:
          $ref: '#/components/schemas/ProjectStatus'
   - training_finished    stock_engine_id:
          allOf:
 - training_started          - $ref: '#/components/schemas/nullableStockEngineUuid'
    - tuning_failed       - deprecated: true
       - tuning_finishedstock_engine_uuid:
          $ref: '#/components/schemas/nullableStockEngineUuid'
    - tuning_started   target_language:
          $ref: '#/components/schemas/targetLanguage'
 - unpublished      timestamps:
          - updated$ref: '#/components/schemas/ProjectTimestamps'
    EngineEventCollectionProjectActions:
      type: object
      requireddescription: An object describing the actions possible against a project.
- data     required:
   - meta    - delete
 properties:       - translate
data:        - update
 type: array    properties:
      items:  delete:
          $reftype: '#/components/schemas/EngineEvent'boolean
        metatranslate:
          $reftype: '#/components/schemas/CollectionMetadata'boolean
    engineId:    update:
  description: Engine ID       type: integerboolean
    ProjectCat:
 example: 10     EngineInstancetype: object
      typenullable: objecttrue
      requireddescription: An object describing the links to a CAT -tool idserver and project.
      - engine_idrequired:
        - dispatcher_urlproject
        - statusserver
      properties:
        idproject:
          $ref: '#/components/schemas/numericalIdProjectCatProject'
        engine_idserver:
          $ref: '#/components/schemas/engineId'
 ProjectCatServer'
    ProjectCatProject:
      type: object
      dispatcher_url:
 required:
        - id
        - name
      properties:
        $refid:
'#/components/schemas/dispatcherUrl'          statusoneOf:
            - $ref: '#/components/schemas/engineInstanceStatus'type: integer
            - EngineInstanceCollection:type: string
          example:  type: object849660f2-d081-4d7f-b266-f526ad073521
        requiredname:

       - data  type:  string
    - meta       propertiesexample: My CAT server project
    dataProjectCatServer:
   
      type: arrayobject
      required:
   items:     - id
      $ref: '#/components/schemas/EngineInstance'
  - name
      meta:  - type
       $ref: '#/components/schemas/CollectionMetadata'properties:
    engineInstanceStatus:    id:
  type: string       enumtype: integer
       - deploying  example: 5
     - error_removal_engine_manager_internal_error  name:
      - error_removal_engine_manager_rejected_request   type: string
    - error_removal     example: My CAT server -connection
on        type:
- queued         - removing$ref: '#/components/schemas/catToolServerType'
    EngineResourcesProjectCollection:
      type: object
      required:
        - corporadata
        - stock_enginemeta
      properties:
        corporadata:
          $reftype: '#/components/schemas/EngineResourcesCorpora' array
          stock_engineitems:
            $ref: '#/components/schemas/StockEngineProject'
    EngineResourcesCorpora:    meta:
  type: object       required:$ref: '#/components/schemas/CollectionMetadata'
    ProjectCounts:
   - current  type: object
     - trainedrequired:
        - tunedfiles
      properties:
        currentfiles:
          $reftype: '#/components/schemas/EngineCorpora'number
        trained:  example: 5
    projectId:
  $ref: '#/components/schemas/EngineCorpora'   description: Project ID
   tuned:   type: integer
      typeexample: 30
array    projectName:
      itemstype: string
      example:     $ref: '#/components/schemas/EngineCorpusIdWithVersion'My Project
    engineStatusProjectStatus:
      type: string
      enum:
        - changedempty
        - errornew
        - queued
        - trainedstarted
        - trainingtranslated
        - tunedtranslating
     ProjectTimestamps:
  - tuning   type: object
    - untrained required:
   Error:     - created_at
type: object       properties:- updated_at
       errorproperties:
        created_at:
 type: string        $ref: '#/components/schemas/createdAt'
 example: "Error message."     updated_at:
 required:         - error$ref: '#/components/schemas/updatedAt'
    errorCoderemoteCorpusId:
      typedescription: The integerID of the corpus on the CAT nullable:tool trueserver.
      exampleoneOf: 104

   Event:      - type: number
 object       - requiredtype: string
      example: "a6fd0c40-7b5c-48bf-89c2-629417b398cd"
id    RemoteDispatcherCollection:
    - resource_id type: object
      - timestamprequired:
        - typedata
        - usermeta
      properties:
        iddata:
          $reftype: '#/components/schemas/numericalId' array
          timestampitems:
            $ref: '#/components/schemas/timestampRemoteDispatcher'
        usermeta:
          $ref: '#/components/schemas/EventUserCollectionMetadata'
    EventUserRemoteDispatcher:
      type: object
      nullable: true
      required:
        - id
        - nameregion
      properties:  - url
     id:   - timestamps
      $ref: '#/components/schemas/userId'properties:
        nameid:
          $ref: '#/components/schemas/userNamedispatcherId'
    Group:    region:
  type: object       required$ref: '#/components/schemas/dispatcherRegion'
       - id
        - name
      properties:
        id url:
          $ref: '#/components/schemas/groupIddispatcherUrl'
        nametimestamps:
          type: string
          example: Default$ref: '#/components/schemas/RemoteDispatcherTimestamps'
    GroupCollectionRemoteDispatcherTimestamps:
      type: object
      required:
        - created_at
        - dataupdated_at
      properties:
        datacreated_at:
          type$ref: array'#/components/schemas/createdAt'
          items:
updated_at:
           $ref: '#/components/schemas/GroupupdatedAt'
    groupIdsourceLanguage:
      description: Source Grouplanguage IDcode
      type: integerstring
      example: 2en-us
    LanguageStockEngine:
      type: object
      required:
        - id
      properties:         id:
          type: string
  - source_language
       example: en-us
    LanguageCollection:
      type: object
      required: target_language
        - dataversion
        - metatimestamps
      properties:
        dataid:
          type$ref: array'#/components/schemas/stockEngineId'
          items:
 source_language:
          $ref: '#/components/schemas/LanguagesourceLanguage'
        metatarget_language:
          $ref: '#/components/schemas/CollectionMetadatatargetLanguage'

   nullableStockEngineId:     version:
 description: Stock engine ID       nullabletype: true
   string
  type: integer       example: 23
  4.1.0
 numericalId:       descriptiontimestamps: ID

     type: integer       example$ref: 10'#/components/schemas/StockEngineTimestamps'
    remoteCorpusIdstockEngineId:
      description: Stock Theengine ID
of the corpus on the CAT tooltype: server.integer
      oneOfexample: 5
    StockEngineTimestamps:
     - type: numberobject
      required:
 - type: string     - created_at
example: "a6fd0c40-7b5c-48bf-89c2-629417b398cd"     RemoteDispatcherCollectionproperties:
        type: objectcreated_at:
          required$ref: '#/components/schemas/createdAt'
       - dataupdated_at:
        - meta $ref: '#/components/schemas/updatedAt'
    propertiestargetLanguage:
        datadescription: Target language  code
      type: arraystring
          itemsexample: it
    timestamp:
      $refdescription: '#/components/schemas/RemoteDispatcher'
   Timestamp in ISO 8601 format
    meta:  type: string
       $ref: '#/components/schemas/CollectionMetadata'example: "2020-06-06T10:45:00+00:00"
    RemoteDispatcherTrainingJob:
      type: object
      required:
        - id
        - regionengine_id
        - urlpercentage
        - timestamps
      properties:
        id:
          $ref: '#/components/schemas/dispatcherIdnumericalId'
        regionengine_id:
          $ref: '#/components/schemas/dispatcherRegion'engineId'
        progress:
          description: Training progress as percentage.
          type: integer
         url nullable: true
          $refexample: '#/components/schemas/dispatcherUrl'60
        timestamps:
          $ref: '#/components/schemas/RemoteDispatcherTimestampsJobTimestamps'
    RemoteDispatcherTimestampsTrainingJobCollection:
      type: object
      required:
        - created_atdata
        - updated_atmeta
      properties:
        created_atdata:
          $reftype: '#/components/schemas/createdAt' array
          updated_atitems:
            $ref: '#/components/schemas/updatedAtTrainingJob'
    sourceLanguage:    meta:
  description: Source language code     $ref:  type: string'#/components/schemas/CollectionMetadata'
    TranslationJob:
   example: en-us  type: object
 StockEngine:     required:
 type: object      - required:id
        - file_id
        - sourceproject_languageid
        - target_languagetimestamps
      properties:
 - version      id:
  - timestamps       properties:$ref: '#/components/schemas/numericalId'
        file_id:
          $ref: '#/components/schemas/stockEngineIdfileId'
        sourceproject_languageid:
          $ref: '#/components/schemas/sourceLanguageprojectId'
        target_languagetimestamps:
          $ref: '#/components/schemas/targetLanguage'
 JobTimestamps'
    TranslationJobCollection:
      type: object
      version:required:
        - data
        - meta
   type: string  properties:
        exampledata:
 4.1.0         timestampstype: array
          $refitems:
'#/components/schemas/StockEngineTimestamps'     stockEngineId:       description$ref: Stock engine ID'#/components/schemas/TranslationJob'
        typemeta:
  integer        example$ref: 5'#/components/schemas/CollectionMetadata'
    StockEngineTimestampsUpdateCorpus:
      type: object
      requiredproperties:
        name:
  - created_at       properties:$ref: '#/components/schemas/corpusName'
        createdgroup_atids:
          $ref: '#/components/schemas/createdAtcorpusGroupIds'
        updated_atmetadata:
          $ref: '#/components/schemas/updatedAt'CorpusMetadata'
    UpdateCorpusContent:
      type: object
      targetLanguage:required:
        - file
      descriptionproperties:
  Target language code    file:
  type: string       exampletype: itobject
    timestampupdatedAt:
      description: Updated Timestamptimestamp in ISO 8601 format
      type: string
      nullable: true
      example: "20202017-0608-06T1030T04:4534:0026+00:00"
    UpdateCorpusUpdateProject:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/corpusNameprojectName'
        groupengine_idsid:
          $ref: '#/components/schemas/corpusGroupIdsnullableEngineId'
        metadataengine_version:
          $ref: '#/components/schemas/CorpusMetadatanullableEngineVersion'
    UpdateCorpusContent:       type: object
stock_engine_id:
     required:         - file
      properties:
$ref: '#/components/schemas/nullableStockEngineId'
       file:
   UpdateEngine:
      type: object
    updatedAt:       description: Updated timestamp in ISO 8601 formatproperties:
        type: string
      nullable: true
      example: "2017-08-30T04:34:26+00:00"
name:
   UpdateEngine:       type: object
 string
    properties:         nameexample: Engine 1
        typenote: string
          example$ref: Engine 1'#/components/schemas/engineEventNote'
        published:
          type: boolean
          example: true
        resources:
          $ref: '#/components/schemas/UpdateEngineResources'
    UpdateEngineResources:
      type: object
      properties:
        corpus_ids:
          $ref: '#/components/schemas/UpdateEngineResourcesCorpusIds'
        stock_corpora:
          type: boolean
          description: Whether or not to use available stock corpora for training the engine.
    UpdateEngineResourcesCorpusIds:
      type: object
      properties:
        core:
          type: array
          items:
            type: string
          example: [ '51fc7ea3fa889.b0027797', '54018363fa5c1.044227af' ]
        auxiliary:
          type: array
          items:
            type: string
          example: [ '5b04a7263fa509.77444794', '5b0412363fa5c1.c4354792' ]
    userId:
      type: integer
      example: 5
    userName:
      type: string
      example: John Doe
    uuid:
      type: string
      example: "21cfda50-1944-46fc-901c-04a168ea6fee"