Info |
---|
This documentation is incomplete. New endpoints will continue be published from time to time. |
Note |
---|
The APIs in this part of the documentation are in beta, and may be subject to change without prior notice. |
Parameters
The following parameters are required (and should never be hardcoded) to make requests:
...
Open api |
---|
openapi: 3.0.2 servers: [] info: title: Globalese version: "3-beta" description: Globalese API v3 tags: beta- tagsname: Corpora - name: Engines - name: Engine instances - name: Groups - name: Languages - name: Segment translation dispatchers paths: /enginescorpora: get: tags: - EnginesCorpora security: - bearer: [ ] summary: List enginescorpora description: | Returns a collection of enginescorpora. parameters: A translation API key can also be- used for authentication. 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' - name$ref: sort'#/components/parameters/engineId' - in$ref: query'#/components/parameters/metadataDomain' - schema:$ref: '#/components/parameters/metadataSubject' - $ref: '#/components/parameters/metadataClient' type: string - $ref: '#/components/parameters/metadataProject' enum: - $ref: '#/components/parameters/metadataDescription' - name$ref:asc '#/components/parameters/corpusCatServerId' - name: name - name:desc responsesin: query 200:description: Full or partial corpus name for filtering. descriptionschema: OK contenttype: string - name: sort application/json: in: query schema: schema: $ref: '#/components/schemas/EngineCollection' type: string 401: enum: $ref: '#/components/responses/401Unauthorized' - 500name:asc $ref: '#/components/responses/500InternalServerError' /engine-instances name:desc get: tags: - counts.segment_count:asc - Engine instances security: - counts.segment_count:desc - bearerresponses: [ ] summary200: List engine instances description: |OK Returns a collectioncontent: of engine instances (being) deployed. application/json: Required permissions: `MANAGE_ENGINES|TRANSLATE|SYSTEM_ADMINISTRATOR` A translation API key can also be used for authentication. schema: parameters: - $ref: '#/components/parametersschemas/numericalIdsCorpusCollection' - $ref401: '#/components/parameters/engineIds' - $ref: '#/components/parametersresponses/groupIds401Unauthorized' - $ref403: '#/components/parameters/limitmax100' - $ref: '#/components/parametersresponses/offset403Forbidden' responses: 500: 200: $ref: '#/components/responses/500InternalServerError' descriptionpost: OK tags: content: - Corpora application/jsonsecurity: - bearer: [ ] schema: summary: Upload a new corpus $refdescription: '#/components/schemas/EngineInstanceCollection'| 401: $ref: '#/components/responses/401Unauthorized' 403: $ref: '#/components/responses/403Forbidden' 500The `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. 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 the group 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' delete: tags: - Corpora security: - bearer: [ ] summary: Delete a corpus description: | Delete a corpus. Required permissions: `MANAGE_CORPORA` in all 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 the group 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 the group 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 current corpus for training * engine IDs that used the current corpus for tuning Required permissions: `MANAGE_CORPORA` in the group the corpus belongs 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 the group the corpus belongs to, or `SYSTEM_ADMINISTRATOR` requestBody: $ref: '#/components/requestBodies/UpdateCorpus' 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/limitmax100' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/sourceLanguage' - $ref: '#/components/parameters/targetLanguage' - $ref: '#/components/parameters/groupIds' - name: sort in: query schema: type: string enum: - name:asc - name:desc responses: 200: description: OK content: application/json: schema: $ref: '#/components/schemas/EngineCollection' 401: $ref: '#/components/responses/401Unauthorized' 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' /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' /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' 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 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 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 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' 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' UpdateCorpus: content: multipart/form-data: schema: $ref: '#/components/schemas/UpdateCorpus' responses: 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 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 - engines - format - groups - metadata - name - source_language - target_language - version properties: id: $ref: '#/components/responsesschemas/500InternalServerErrorcorpusId' postactions: tags: $ref: '#/components/schemas/CorpusActions' -cat: Engine instances security$ref: '#/components/schemas/CorpusCat' - bearercounts: [ ] summary$ref: Create a new engine instance'#/components/schemas/CorpusCounts' engine_ids: description: | Startstype: deployingarray an engine in the background. items: Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR` requestBodytype: integer $ref: '#/components/requestBodies/CreateEngineInstance' example: [ 2, 8, 14 responses:] 202format: description$ref: The newly created engine instance entity in the database.'#/components/schemas/corpusFormat' group_ids: contenttype: array application/jsonitems: schematype: integer example: [ 1, $ref: '#/components/schemas/EngineInstance'3 ] 400metadata: $ref: '#/components/responsesschemas/400BadRequestCorpusMetadata' 401name: $reftype: '#/components/responses/401Unauthorized'string 403: example: English to German DGT.tmx $ref: '#/components/responses/403Forbidden' 500source_language: $ref: '#/components/responsesschemas/500InternalServerErrorsourceLanguage' /engine-instances/{id}: parameterstarget_language: - name$ref: id'#/components/schemas/targetLanguage' descriptionversion: Engine instance ID in$ref: path'#/components/schemas/corpusVersion' required: trueCorpusActions: schematype: object description: An object type:describing integerthe actions possible against a get:corpus. tagsrequired: - Enginedelete instances security: - update - bearerproperties: [ ] summarydelete: Show the details of an engine instance type: boolean description: | update: Returns a single engine instance. type: boolean Required permissions: `MANAGE_ENGINES|TRANSLATE|SYSTEM_ADMINISTRATOR`CorpusCat: type: object A translation API key can alsonullable: betrue used for authentication. description: | responses: If the 200:corpus was created by retrieving a CAT tool server corpus, this description:object OKcontains relevant information. required: content: - corpus application/json: - server properties: schema: corpus: $ref: '#/components/schemas/EngineInstanceCorpusCatCorpus' 401server: $ref: '#/components/responsesschemas/401Unauthorized' CorpusCatServer' CorpusCatCorpus: type: object 403:required: - id $refproperties: '#/components/responses/403Forbidden' 404id: $ref: '#/components/responsesschemas/404NotFoundremoteCorpusId' CorpusCatServer: 500: type: object $refrequired: '#/components/responses/500InternalServerError' - 502:id - type $ref: '#/components/responses/502BadGateway' deleteproperties: tags: id: $ref: '#/components/schemas/catToolServerId' - Engine instances type: security: - bearer$ref: [ ]'#/components/schemas/catToolServerType' summary: Delete an engine instanceCorpusCollection: type: object description: | required: Removes a deployed engine instance. - data Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR`- meta responsesproperties: 204data: $reftype: '#/components/responses/204NoContent' array 400items: $ref: '#/components/responsesschemas/400BadRequestCorpus' 401meta: $ref: '#/components/responsesschemas/401UnauthorizedCollectionMetadata' CorpusContent: 403: type: object $ref: '#/components/responses/403Forbidden'required: 404: - data $ref: '#/components/responses/404NotFound' - meta 500properties: data: $ref: '#/components/responses/500InternalServerError' type: 502:array $refitems: '#/components/responses/502BadGateway' /groups: get: type: object tags: - Groups required: security: - id bearer: [ ] summary: List groups - content description: Returns a collection of groups the authenticated userproperties: is a member of. parameters: id: - $ref: '#/components/parameters/limitmax100' - $reftype: '#/components/parameters/offset'string - name: sort example: "1" in: query schemanullable: true typecontent: string enumtype: object - name:asc required: - name:desc - source responses: 200: - target description: OK content: properties: application/json: source: schema: $reftype: '#/components/schemas/GroupCollection' string 401: $reftarget: '#/components/responses/401Unauthorized' 403: $reftype: '#/components/responses/403Forbidden'string 500meta: $ref: '#/components/responsesschemas/500InternalServerError'CollectionMetadata' CorpusCounts: /languages:type: object getrequired: tags:- segment_count - Languagessource_word_count security:- target_word_count - bearer: [ ]source_character_count summary: List languages- target_character_count descriptionproperties: | segment_count: Returns a collection of languages used in Globalese. type: integer A translation API key can alsoexample: be145952 used for authentication. parameters:source_word_count: - $reftype: '#/components/parameters/languageUsage'integer - $ref: '#/components/parameters/limit' example: 2819806 - $ref: '#/components/parameters/offset'target_word_count: responsestype: integer 200 example: 3120176 description: OKsource_character_count: contenttype: integer application/jsonexample: 24235334 target_character_count: schema: type: integer $refexample: '#/components/schemas/LanguageCollection' 29194748 CorpusEvent: 401allOf: - $ref: '#/components/responsesschemas/401UnauthorizedEvent' 500- type: object $ref: '#/components/responses/500InternalServerError' /segment-translation-dispatchers properties: get: tags: resource_id: - Segment translation dispatchers security$ref: '#/components/schemas/corpusId' - bearer: [ ] type: summary: List segment translation dispatchers descriptiontype: |string Required permissions: `MANAGE_ENGINES|SYSTEM_ADMINISTRATOR` enum: responses: 200: - uploaded description: OK content:- updated application/json: - new_version_uploaded CorpusEventCollection: schema: type: object required: $ref: '#/components/schemas/RemoteDispatcherCollection' - data 401: - meta $ref: '#/components/responses/401Unauthorized'properties: 403data: $reftype: '#/components/responses/403Forbidden'array 500items: $ref: '#/components/responsesschemas/500InternalServerErrorCorpusEvent' 502meta: $ref: '#/components/responsesschemas/502BadGatewayCollectionMetadata' components: parameters: engineIds corpusFormat: nametype: engine_idsstring inenum: query description: |- csv-comma One or more engine ID(s) for filtering, comma-separated.- csv-memoq - Examples: `1`, `1,3,5`csv-semicolon schema:- tmx oneOf: - tbx - type: integer tsv - type:xliff string groupIds: - name: group_ids in: queryxliff-memoq - xliff-memsource description: | - xliff-sdl One or more group ID(s) for filtering, comma-separated. xliff-smartcat Examples: `1`, `1,3,5`- xliff-translate5 schema: - xliff-wordbee oneOf: - xliff-xtm corpusId: - type: integer description: Corpus ID - type: string styleexample: form5a0ba1267f0571.04642701 CorpusMetadata: explode: false languageUsagetype: object nameproperties: usage indomain: query description: | type: string Filter for languages used in Globalese.nullable: true Optionally, the `example:source` orlegal `:target` modifier may be appended to the parameter valuesubject: to filter for languages used on the source or target languagetype: sidestring only. `usage=enginesnullable:source` willtrue return a list of languages used as engine source languages. example: EU treaties `usage=engines` will returnclient: a list of languages used as engine languages, either source ortype: target.string schema: nullable: true type: string example: Very Important enum:Client project: - engines limit: type: string name: limit innullable: querytrue description: | example: 0192 EC Project Limit for results. *May* be used together with `offset`.description: Examplestype: `25`,string `50` schema: nullable: true type: integer limitmax100example: created by DGT name CorpusVersion: limit intype: queryobject descriptionrequired: | - Limitversion for results. It cannot be greater than 100. *May*- becounts used together with `offset`. - engine_ids Examples: `25`, `50` - timestamps If notproperties: provided, it will automatically be set to 100. version: schema: $ref: '#/components/schemas/corpusVersion' type: integer numericalIdscounts: name$ref: ids'#/components/schemas/CorpusCounts' in: query engine_ids: description: | $ref: '#/components/schemas/CorpusVersionEngineIds' One or more ID(s) for filtering, comma-separated.timestamps: Examples$ref: `3`, `3,4`'#/components/schemas/CorpusVersionTimestamps' schemacorpusVersion: typedescription: stringThe version of the corpus style: form type: integer explode: false offsetexample: 1 nameCorpusVersionCollection: offset intype: queryobject descriptionrequired: | - Offset to start query from. **Must** be used together with `limit`. data - meta Examplesproperties: `50`, `100` schemadata: type: integerarray sourceLanguage: items: name: source_language in: query $ref: '#/components/schemas/CorpusVersion' description: | meta: Source language. $ref: '#/components/schemas/CollectionMetadata' Examples: `en`, `fr`CorpusVersionEngineIds: schematype: object typerequired: string targetLanguage: - trained name: target_language - tuned in: query properties: description: | trained: Target language. type: array Examples: `en`, `fr` schemaitems: type: string requestBodiestype: integer CreateEngineInstance: requiredexample: true[ 2, 8, 14 content:] application/jsontuned: schematype: array typeitems: object requiredtype: integer example: [ 2, - engine_id 8, 14 ] CorpusVersionTimestamps: type: object - dispatcher_id required: properties: - created_at properties: engine_id: created_at: $ref: '#/components/schemas/engineIdcreatedAt' CreateCorpus: dispatcher_idtype: object required: $ref: '#/components/schemas/dispatcherId' responses:- file 204NoContent: - format description: No Content 400BadRequest:- group_ids[] descriptionproperties: Bad Request contentfile: application/json: type: object schemaformat: $ref: '#/components/schemas/ErrorcorpusFormat' 401Unauthorized: group_ids[]: description: Unauthorized content:$ref: '#/components/schemas/groupId' application/jsonsource_language: schema:$ref: '#/components/schemas/sourceLanguage' target_language: $ref: '#/components/schemas/ErrortargetLanguage' 403Forbidden: metadata[domain]: description: Insufficient permissions contenttype: string application/json: example: legal schema: metadata[subject]: $reftype: '#/components/schemas/Error'string 404NotFound: description: Resource not found 422UnprocessableEntityexample: EU treaties description: Unprocessable entity metadata[client]: 500InternalServerError: descriptiontype: string Internal server error while processing the request example: Very Important content:Client application/jsonmetadata[project]: schematype: string $refexample: '#/components/schemas/Error' 0192 EC Project 502BadGateway: metadata[description]: Bad Gateway securitySchemes: bearertype: string type: http example: created by scheme:DGT bearer createdAt: description: API key description: schemas:Created timestamp in ISO 8601 CollectionMetadata:format type: string object required:example: "2017-08-30T04:34:26+00:00" dispatcherId: - counts description: Segment-based translation dispatcher ID properties: type: integer counts: example: 1 typedispatcherRegion: object type: string required: example: "europe-west1" dispatcherUrl: - total type: string example: "https://dispatcher-europe-west1-ja6vheawuq- filteredew.a.run.app" Engine: propertiestype: object totalrequired: - id description: The total number of- resourcesgroup_id in the system, irrespective of any filters. - instance_ids - name type: integer - source_language example: 100 - target_language - uuid filtered: properties: descriptionid: The number of resources in the system matching the filters. $ref: '#/components/schemas/engineId' group_id: type: integer $ref: '#/components/schemas/groupId' exampleinstance_ids: 40 createdAt: type: array description: Created timestamp in ISO 8601 format items: type: string example: "2017-08-30T04:34:26+00:00" dispatcherId: $ref: '#/components/schemas/numericalId' descriptionname: Segment-based translation dispatcher ID type: string integer example: Engine 1 dispatcherRegion: source_language: type: string example$ref: "europe-west1"'#/components/schemas/sourceLanguage' dispatcherUrl: target_language: type: string example$ref: "https://dispatcher-europe-west1-ja6vheawuq-ew.a.run.app"'#/components/schemas/targetLanguage' Engine: uuid: type: object required:$ref: '#/components/schemas/engineUuid' EngineCollection: - id type: object - group_idrequired: - instance_idsdata - namemeta - source_languageproperties: - target_language data: - uuid type: array properties: iditems: $ref: '#/components/schemas/engineIdEngine' group_idmeta: $ref: '#/components/schemas/groupIdCollectionMetadata' engineId: instance_ids: description: Engine ID type: integer array example: 10 items EngineInstance: type: object $ref: '#/components/schemas/numericalId' required: - id - engine_id - dispatcher_url name: - status type: stringproperties: id: example$ref: Engine 1'#/components/schemas/numericalId' sourceengine_languageid: $ref: '#/components/schemas/sourceLanguageengineId' targetdispatcher_languageurl: $ref: '#/components/schemas/targetLanguagedispatcherUrl' uuidstatus: $ref: '#/components/schemas/engineUuidengineInstanceStatus' EngineCollectionEngineInstanceCollection: type: object required: - data - meta properties: data: type: array items: $ref: '#/components/schemas/Engine' meta: $ref: '#/components/schemas/CollectionMetadata' engineId: description: Engine ID type: integer example: 10 EngineInstance: type: object EngineInstance' required: meta: - id $ref: '#/components/schemas/CollectionMetadata' - engine_id engineInstanceStatus: type: -string dispatcher_url enum: - status - deploying properties: id:- error_removal_engine_manager_internal_error $ref: '#/components/schemas/numericalId'- error_removal_engine_manager_rejected_request - engineerror_id:removal - on $ref: '#/components/schemas/engineId' - queued dispatcher_url: - removing $ref: '#/components/schemas/dispatcherUrl' engineUuid: statustype: string $ref: '#/components/schemas/engineInstanceStatus'example: "21cfda50-1944-46fc-901c-04a168ea6fee" EngineInstanceCollectionError: type: object requiredproperties: error: - data type: string - meta propertiesexample: "Error message." datarequired: - error type: array Event: type: items:object required: $ref: '#/components/schemas/EngineInstance' - id meta: - resource_id $ref: '#/components/schemas/CollectionMetadata' - timestamp engineInstanceStatus: - type: string enum: - user -properties: deploying - error_removal_engine_manager_internal_errorid: $ref: - error_removal_engine_manager_rejected_request'#/components/schemas/numericalId' timestamp: - error_removal - on$ref: '#/components/schemas/timestamp' user: - queued - removing$ref: '#/components/schemas/EventUser' engineUuidEventUser: type: stringobject examplenullable: "21cfda50-1944-46fc-901c-04a168ea6fee" true Errorrequired: type: object- id properties: - name error: properties: typeid: string example: "Error message."$ref: '#/components/schemas/userId' requiredname: - error $ref: '#/components/schemas/userName' Group: type: object required: - id - name properties: id: $ref: '#/components/schemas/groupId' name: type: string example: Default GroupCollection: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Group' groupId: description: Group ID type: integer example: 2 Language: type: object required: - id properties: id: type: string example: en-us LanguageCollection: type: object required: - data - meta properties: data: type: array items: $ref: '#/components/schemas/Language' meta: $ref: '#/components/schemas/CollectionMetadata' numericalId: description: ID type: integer example: 10 remoteCorpusId: description: The ID of the corpus on the CAT tool server. oneOf: - type: number - type: string example: 10"a6fd0c40-7b5c-48bf-89c2-629417b398cd" RemoteDispatcherCollection: type: object required: - data - meta properties: data: type: array items: $ref: '#/components/schemas/RemoteDispatcher' meta: $ref: '#/components/schemas/CollectionMetadata' RemoteDispatcher: type: object required: - id - region - url - timestamps properties: id: $ref: '#/components/schemas/dispatcherId' region: $ref: '#/components/schemas/dispatcherRegion' url: $ref: '#/components/schemas/dispatcherUrl' timestamps: $ref: '#/components/schemas/RemoteDispatcherTimestamps' RemoteDispatcherTimestamps: type: object required: - created_at - updated_at properties: created_at: $ref: '#/components/schemas/createdAt' updated_at: $ref: '#/components/schemas/updatedAt' sourceLanguage: description: Source language code type: string example: en-us targetLanguage: description: Target language code type: string example: it timestamp: description: Timestamp in ISO 8601 format sourceLanguagetype: string description: Source language codeexample: "2020-06-06T10:45:00+00:00" UpdateCorpus: type: stringobject examplerequired: en-us - targetLanguage:file descriptionproperties: Target language code file: type: string exampletype: itobject updatedAt: description: Updated timestamp in ISO 8601 format type: string nullable: true example: "2017-08-30T04:34:26+00:00" userId: type: integer example: 5 userName: type: string example: John Doe |