TranslationTasks

A translationTask describes how a bunch of source documents shall be translated. A translationTask describes a translation from one source language to one target language.

Endpoints

Method URI
GET /rest/api/translationTasks/
POST /rest/api/translationTasks/
GET /rest/api/translationTasks/{task_id}
PATCH /rest/api/translationTasks/{task_id}
DELETE /rest/api/translationTasks/{task_id}
GET /rest/api/translationTasks/{task_id}/sourceDocuments/
PATCH /rest/api/translationTasks/{task_id}/sourceDocuments/
DELETE /rest/api/translationTasks/{task_id}/sourceDocuments/{docId}
GET /rest/api/translationTasks/{task_id}/quoteEnquiries
GET /rest/api/translationTasks/{task_id}/quotes
GET /rest/api/translationTasks/{task_id}/acceptedQuotes
GET /rest/api/translationTasks/{task_id}/targetDocuments
GET /rest/api/translationTasks/{task_id}/targetDocuments/content
GET /rest/api/translationTasks/{task_id}/analysis
GET /rest/api/translationTasks/{task_id}/documentConversions
GET /rest/api/translationTasks/{task_id}/documentPretranslations
GET /rest/api/translationTasks/{task_id}/documentReviews
GET /rest/api/translationTasks/{task_id}/translationDeliveries

Default Schema

{
  "source": "en-US",
  "target": [
    "fr-FR",
    "es-MX"
  ],
  "createdAt": "2017-07-14T07:51:43.274Z",
  "desiredDeadline": null,
  "complete": true,
  "preparationComplete": true,
  "cancelled": false,
  "sourceText": "This is the text for an instant translation.",
  "email": "api-user@example.tld",
  "sourceDocumentIds": [
    "59687ebc21b7620007c198a6",
    "59687eda21b7620007c198a8"
  ],
  "additionalDocumentIds": [],
  "convertedSourceDocumentIds": [
    "596880605aad29000176443a",
    "596880615aad29000176443c",
    "596880615aad29000176443e",
    "596880665aad290001764440"
  ],
  "transformedSourceDocumentIds": [
    "596880605aad29000176443a",
    "596880615aad29000176443c",
    "596880615aad29000176443e",
    "596880665aad290001764440"
  ],
  "comment": "The is a comment. Submit any processing instructions related to this translationTask",
  "quoteIds": [
    "5968807d3e6b510001bb42fc",
    "596880813e6b510001bb42fd"
  ],
  "progress": "TRANSLATION_DELIVERED",
  "projectId": "WyuFDGdyZQbpC9ndf",
  "workflowConfig": {
    "mode": "AUTO"
  },
  "id": "3xs8fFiBueQwFs9cN",
  "tags": ["category1", "my-special-tag"],
  "features": ["default"]
}

Properties

Property Writeable Value
source The BCP-47 code of the source language. This shall represent the language of the source documents.
target An array of target languages as BCP-47 code of each target language. This shall be desired language(s) of the translated target documents.
createdAt readonly The date when the translationTask has been created. The date time will be exposed as ISO 8601 date format.
desiredDeadline optional The desired date when the translation should be delivered. The desired deadline must be in the future and will be exposed as ISO 8601 date format.
complete Indicates if the translationTask is complete. complete can only be set to true if source and target are set and source documents haven been attached to this translationTask. When complete is set to true, quotes will be requested and the translationTask can not be modified any more.
preparationComplete readonly Indicates if the preparation of the documents (conversion and analysis) is done without errors.
cancelled Indicates if the translationTask is cancelled.
email The email address of the user creating this translationTask. You can provide a specific email address for the contact person who is ordering the translation. Otherwise this address is automatically set, when the translationTask is created, from your user data of the user you logged in into contenthub.
sourceText This property is only used when creating an instant translation. This property is not output in the response. The content is converted into a file with the format sourceText_xSZsyydQhGTWCRw9a.txt during the workflow.
sourceDocumentIds The ids of the source documents of the translationTask are listed here.
additionalDocumentIds readonly The ids of documents with informations for the translator related for the translationTask
convertedSourceDocumentIds readonly The converted documents which are used as source documents for translation. There is always one converted document created per document and target language.
Deprecated: use transformedSourceDocumentIds instead
transformedSourceDocumentIds readonly The transformed documents (converted to xliff and pre-translated if necessary) which are used as source documents for translation. There is always one transformed document created per document and target language.
comment Processing instructions for the given translationTask.
quoteIds readonly The IDs of the submitted quotes to the translationTask are listed here.
progress readonly The enumeration that indicates the current progress of the translationTask in the workflow. The possible values are:
NEW
The translationTask is in a "draft" mode and not completed yet.
IN_PREPARATION
The preparation of the translationTask is in progress. When the workflow-mode is set to "MANUAL" the translationTask waits for user interaction to progress.
PREPARATION_FAILED
The preparation has failed. Possible reasons are a problem in the document conversion or the TM-analysis.
COMPLETE_AND_PREPARED
All documents are prepared and the TM-analysis is done. The quote enquiries were sent to the associated vendors. This all happens automatically when the workflow-mode is set to "AUTO" (default for translationTasks which are created through the api)
TASK_CANCELLED
If a translationTask is on COMPLETE_AND_PREPARED, QUOTE_ACCEPTED, ACCEPTED_QUOTE_SUBMITTED or ORDER_CONFIRMED and no translations have been delivered yet, it is possible to cancel a translationTask and it will disapear from the users view. Please note that it is not possible to cancel a translation when already one language of a translationTask was delivered. In the case that one of the ordered languages should be cancelled, please use the quotes endpoint and set the accepted quote to state CANCELLED.
QUOTE_ACCEPTED
This is a temporary workflow step where the user accepted a quote but the submittance to the vendor didn't yet happened.
ACCEPTED_QUOTE_SUBMITTED
The acceptance of the quote was submitted to the vendor. This is also a temporary workflow step. This workflow step remains as long as the vendor doesn't confirm the receipt of the order.
ORDER_CONFIRMED
The vendor has received the order and confirmed the receipt. He is now working on the translation.
IN_REVIEW
The translationis delivered by the supplier and should be reviewed (or is in review)
TRANSLATION_DELIVERED
All documents for translation were delivered by the vendor.
projectId optional The id of the linked project. The value is optional but if set a project with this id must exist.
workflowConfig Shows the workflow-mode of the translationTask. All translationTasks which are created via the API are automatically in workflow-mode AUTO.
id readonly The id that identifies the translationTask.
tags optional Tags for the given translationTask. Can later be used for filtering tasks by tags in contenthub.
features optional Type informations and features respectively for the given translationTask. For now either ["default"], ["instant"] or ["instant", "withPostEditing"] are supported values where:
["default"]
Describes an ordinary translationTask (also the default value)
["instant"]
is used to create an instant/machine-translated translationTask
["instant", "withPostEditing"]
is used to create an instant/machine-translated translationTask with a subsequent Post-Editing.

Description of Endpoints

GET  /rest/api/translationTasks/

Returns all translationTasks of the users organization.

Example Request:

GET /rest/api/translationTasks/ HTTP/1.1

Example Response:

[
  {
    "source": "de-DE",
    "target": [
      "fr-FR",
      "pt-BR"
    ],
    "createdAt": "2017-06-22T14:56:56.874Z",
    "desiredDeadline": null,
    "complete": true,
    "preparationComplete": true,
    "cancelled": false,
    "email": "api-user@example.tld",
    "sourceDocumentIds": [
      "594bdac2c1b07f000761df23",
      "594bdac2c1b07f000761df21"
    ],
    "additionalDocumentIds": [],
    "convertedSourceDocumentIds": [
      "594bdf0a2fcf73000187a9fc",
      "594bdf0b2fcf73000187aa02"
    ],
    "transformedSourceDocumentIds": [
      "594bdf0a2fcf73000187a9fc",
      "594bdf0b2fcf73000187aa02"
    ],
    "quoteIds": [
      "594bdf3301c9d600019872d9",
      "594bdf3301c9d600019872da",
      "594bdf5401c9d600019872de"
    ],
    "progress": "QUOTE_ACCEPTED",
    "projectId": "WyuFDGdyZQbpC9ndf",
    "workflowConfig": {
      "mode": "MANUAL"
    },
    "id": "7iLmzwrdpAEbRhE94",
    "features": ["default"]
  },
  {
    "source": "de-DE",
    "target": [
      "en-US",
      "ru-RU"
    ],
    "createdAt": "2017-06-22T15:04:51.606Z",
    "desiredDeadline": "2017-06-25T09:00:00.000Z",
    "complete": true,
    "preparationComplete": false,
    "cancelled": false,
    "email": "api-user@example.tld",
    "sourceDocumentIds": [
      "594bdae02fcf73000187a9d8"
    ],
    "additionalDocumentIds": [],
    "convertedSourceDocumentIds": [
      "594bdd692fcf73000187a9f0",
      "594bdd6a2fcf73000187a9f2"
    ],
    "transformedSourceDocumentIds": [
      "594bdd692fcf73000187a9f0",
      "594bdd6a2fcf73000187a9f2"
    ],
    "quoteIds": [],
    "progress": "IN_PREPARATION",
    "projectId": "BSPWFLB4ZmoG82DsE",
    "workflowConfig": {
      "mode": "AUTO"
    },
    "id": "KWhshBx2nDuSQHLRJ",
    "features": ["instant"]
  }
]

POST  /rest/api/translationTasks/

Creates a new translationTask.

Example Request:

POST /rest/api/translationTasks/ HTTP/1.1

{
  "source": "de-DE",
  "target": [
    "en-US",
    "ru-RU"
  ],
  "projectId": "5742f9fa0f6218b1d0e85ec9"
}

Example Response:

{
  "source": "de-DE",
  "target": [
    "en-US",
    "ru-RU"
  ],
  "createdAt": "2017-07-12T15:27:56.737Z",
  "desiredDeadline": null,
  "complete": false,
  "preparationComplete": false,
  "cancelled": false,
  "email": "api-user@example.tld",
  "sourceDocumentIds": [],
  "additionalDocumentIds": [],
  "convertedSourceDocumentIds": [],
  "transformedSourceDocumentIds": [],
  "quoteIds": [],
  "progress": "NEW",
  "projectId": "BSPWFLB4ZmoG82DsE",
  "workflowConfig": {
    "mode": "AUTO"
  },
  "id": "BdGRZSs657Fvmr9Mc",
  "features": ["default"]
}

GET  /rest/api/translationTasks/{task_id}

Gets a translationTask.

Example Request:

GET /rest/api/translationTasks/5742d02f8d2159e0c2338d4f HTTP/1.1

Example Response:

{
  "source": "de-DE",
  "target": [
    "en-US",
    "nl-NL"
  ],
  "createdAt": "2017-07-12T14:53:07.831Z",
  "desiredDeadline": null,
  "complete": true,
  "preparationComplete": true,
  "cancelled": false,
  "email": "api-user@example.tld",
  "sourceDocumentIds": [
    "596637e96bbaca00074084ed"
  ],
  "additionalDocumentIds": [],
  "convertedSourceDocumentIds": [
    "596638cb5aad290001764428",
    "596638cc5aad29000176442a"
  ],
  "transformedSourceDocumentIds": [
    "596638cb5aad290001764428",
    "596638cc5aad29000176442a"
  ],
  "quoteIds": [
    "596639273e6b510001bb42f0",
    "5966392c3e6b510001bb42f1"
  ],
  "progress": "COMPLETE_AND_PREPARED",
  "projectId": "WyuFDGdyZQbpC9ndf",
  "workflowConfig": {
    "mode": "MANUAL"
  },
  "id": "FEo7qrSs6dkzokJbG",
  "features": ["default"]
}

PATCH  /rest/api/translationTasks/{task_id}

Updates a translationTask.

Possible PATCH operations are:

  1. Update the source language, the target language(s) or the desired deadline
  2. Update the email property or set the sourceDocuments by providing an array of documentIds
  3. Update the status of the translationTask from complete false to true
  4. Cancel the translationTask by setting the cancelled property (please note the cancelation restrictions described in the progress property)

Example Request:

PATCH /rest/api/translationTasks/574483520f62e39b88e5d414 HTTP/1.1

{
  "target": [
    "nb-NO",
    "es-MX"
  ],
  "complete": true
}

Example Response:

{
  "source": "de-DE",
  "target": [
    "nb-NO",
    "es-MX"
  ],
  "createdAt": "2017-07-12T14:53:07.831Z",
  "desiredDeadline": null,
  "complete": true,
  "preparationComplete": false,
  "cancelled": false,
  "email": "api-user@example.tld",
  "sourceDocumentIds": [
    "596637e96bbaca00074084ed"
  ],
  "additionalDocumentIds": [],
  "convertedSourceDocumentIds": [
    "596638cb5aad290001764428",
    "596638cc5aad29000176442a"
  ],
  "transformedSourceDocumentIds": [
    "596638cb5aad290001764428",
    "596638cc5aad29000176442a"
  ],
  "quoteIds": [
    "596639273e6b510001bb42f0",
    "5966392c3e6b510001bb42f1"
  ],
  "progress": "COMPLETE_AND_PREPARED",
  "projectId": "WyuFDGdyZQbpC9ndf",
  "workflowConfig": {
    "mode": "AUTO"
  },
  "id": "FEo7qrSs6dkzokJbG",
  "features": ["default"]
}

When the translationTask should be set to { complete: true } it will be validated if all mandatory data is available. Otherwise the server response will be a 400 Bad Request with the occured errors:

HTTP/1.1 400 Bad Request

[
  {
    "message": "Validation failed | required | source"
  },
  {
    "message": "Validation failed | minCount | sourceDocumentIds"
  }
]

DELETE  /rest/api/translationTasks/{task_id}

Deletes a translationTask. A translationTask can only be deleted in the following progress-states:

The successfull response is the deleted translationTask.

Example Request:

DELETE /rest/api/translationTasks/573ae0a70f62269c13abad32 HTTP/1.1

Example Response:

{
  "source": "de-DE",
  "target": [
    "fr-FR",
    "pt-BR",
    "tr-TR"
  ],
  "createdAt": "2017-07-11T07:47:04.384Z",
  "desiredDeadline": "2017-07-14T08:00:00.000Z",
  "complete": false,
  "preparationComplete": false,
  "cancelled": false,
  "email": "api-user@example.tld",
  "sourceDocumentIds": [
    "596482e2e6f7940007dd86ba"
  ],
  "additionalDocumentIds": [],
  "convertedSourceDocumentIds": [],
  "transformedSourceDocumentIds": [],
  "quoteIds": [],
  "progress": "NEW",
  "projectId": "WyuFDGdyZQbpC9ndf",
  "workflowConfig": {
    "mode": "MANUAL"
  },
  "id": "nk8v4Y9k9Dm9Bw3vm",
  "features": ["default"]
}

If a translationTask cannot be deleted the following error occurs:

HTTP/1.1 400 Bad Request

[
  {
    "message": "Validation failed | read-only-error | The translationTask cannot be deleted since it is marked as complete"
  }
]

GET  /rest/api/translationTasks/{task_id}/sourceDocuments

Gets the related source documents for a translationTask.

Example Request:

GET /rest/api/translationTasks/574483520f62e39b88e5d414/sourceDocuments/ HTTP/1.1

Example Response:

[
  {
    "length": 12929,
    "chunkSize": 261120,
    "uploadDate": "2017-07-14T08:20:12.276Z",
    "md5": "329615e927fcff41ececb651f7d9d86e",
    "filename": "Job 11 - fr-CH.xlf",
    "id": "59687ebc21b7620007c198a6"
  },
  {
    "length": 8601,
    "chunkSize": 261120,
    "uploadDate": "2017-07-14T08:20:42.504Z",
    "md5": "66b0044d0201b1f1ff2af826f9b61aaf",
    "filename": "Job 9 - fr-CH.xlf",
    "id": "59687eda21b7620007c198a8"
  }
]

PATCH  /rest/api/translationTasks/{task_id}/sourceDocuments

Adds a relationship between uploaded documents as the sourceDocuments of a translationTask. You need to first upload documents to add the ids to this request. Please see documents reference for further information. This method can be used to add documents to sourceDocuments successively.

Example Request:

PATCH /rest/api/translationTasks/574483520f62e39b88e5d414/sourceDocuments/ HTTP/1.1

{
  "documentIds": [ "574483520f62e39b88e5d414", "5786656224c8cb8f66ded330" ]
}

Example Response:

[
  "574483520f62e39b88e5d414",
  "5786656224c8cb8f66ded330"
]

DELETE  /rest/api/translationTasks/{task_id}/sourceDocuments/{doc_id}

Removes a relationship between the uploaded documents identified with the docId from the sourceDocuments of a translationTask. This method can be used to remove documents from sourceDocuments successively. The response contains the deleted documentId.

Example Request:

DELETE /rest/api/translationTasks/574483520f62e39b8/sourceDocuments/59687eda21b76200 HTTP/1.1

Example Response:

HTTP/1.1 200 OK

"59687eda21b76200"

GET  /rest/api/translationTasks/{task_id}/quoteEnquiries

Returns a list of all quoteEnquiries requested for each supported LSP vendor of a translationTask. You should start poll this endpoint when the translationTask is completed. Each returned quote enquiry contains the lspVendorId of the requested vendor and a boolean state quotesFetched which signals if a vendor has offered any quotes.

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/quoteEnquiries HTTP/1.1

Example Response:

[
  {
    "authorizationKey": "73e856d8-3825-4382-b9cf-8b5cfe4ef346",
    "quotesFetched": true,
    "createdAt": "2017-07-14T08:27:30.851Z",
    "lspVendorId": "N6vn5teyJ8rTDYPEs",
    "lspVendorName": "24translate TEST",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "target": "nb-NO",
    "enquiryId": "596880741e6226cb73830c65",
    "id": "QpZHeysEeDQ5gY7Df"
  },
  {
    "authorizationKey": "99dcbe59-1950-4503-bdc9-2650b3eabce9",
    "quotesFetched": true,
    "createdAt": "2017-07-14T08:27:30.851Z",
    "lspVendorId": "N6vn5teyJ8rTDYPEs",
    "lspVendorName": "24translate TEST",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "target": "es-MX",
    "enquiryId": "596880741e6226cb73830c66",
    "id": "cWMQ8Z2zcyZesjauu"
  }
]

GET  /rest/api/translationTasks/{task_id}/quotes

Returns all quotes that are related to this translationTask. You need to use the quotes endpoint to accept or reject quotes. Please see quotes reference for further information.

Example Request:

GET /rest/api/translationTasks/573ae0a70f62269c13abad32/quotes HTTP/1.1

Example Response:

[
  {
    "connectorQuoteId": "5968807b1e6226cb73830c69",
    "connectorEnquiryId": "596880741e6226cb73830c65",
    "createdAt": "2017-07-14T08:27:41.842Z",
    "number": "541189",
    "price": {
      "netAmount": "198.66",
      "vatPercentage": "19",
      "currency": "EUR",
      "totalDiscountPercent": "1.5",
      "vatAmount": "37.75",
      "grossAmount": "236.41"
    },
    "state": "OFFERED",
    "tapQuoteEnquiryId": "QpZHeysEeDQ5gY7Df",
    "supplierName": "DEMO Vendor",
    "target": "nb-NO",
    "textAmount": {
      "type": "lines",
      "amount": 71,
      "discountedAmount": 70
    },
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "id": "5968807d3e6b510001bb42fc"
  },
  {
    "connectorQuoteId": "5968807f1e6226cb73830c6a",
    "connectorEnquiryId": "596880741e6226cb73830c66",
    "createdAt": "2017-07-14T08:27:45.241Z",
    "number": "541190",
    "price": {
      "netAmount": "89.46",
      "vatPercentage": "19",
      "currency": "EUR",
      "totalDiscountPercent": "1.5",
      "vatAmount": "17.00",
      "grossAmount": "106.46"
    },
    "state": "OFFERED",
    "tapQuoteEnquiryId": "cWMQ8Z2zcyZesjauu",
    "supplierName": "DEMO Vendor",
    "target": "es-MX",
    "textAmount": {
      "type": "lines",
      "amount": 71,
      "discountedAmount": 70
    },
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "id": "596880813e6b510001bb42fd"
  }
]

GET  /rest/api/translationTasks/{task_id}/acceptedQuotes

Delivers all accepted quotes of the translationTask.

Example Request:

GET /rest/api/translationTasks/573ae0a70f62269c13abad32/acceptedQuotes HTTP/1.1

Example Response:

[
  {
    "connectorQuoteId": "5968807b1e6226cb73830c69",
    "connectorEnquiryId": "596880741e6226cb73830c65",
    "createdAt": "2017-07-14T08:27:41.842Z",
    "number": "541189",
    "price": {
      "netAmount": "198.66",
      "vatPercentage": "19",
      "currency": "EUR",
      "totalDiscountPercent": "1.5",
      "vatAmount": "37.75",
      "grossAmount": "236.41"
    },
    "state": "ACCEPTED",
    "tapQuoteEnquiryId": "QpZHeysEeDQ5gY7Df",
    "supplierName": "24translate TEST",
    "target": "nb-NO",
    "textAmount": {
      "type": "lines",
      "amount": 71,
      "discountedAmount": 70
    },
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "orderNumber": "SAL-541189",
    "id": "5968807d3e6b510001bb42fc"
  },
  {
    "connectorQuoteId": "5968807f1e6226cb73830c6a",
    "connectorEnquiryId": "596880741e6226cb73830c66",
    "createdAt": "2017-07-14T08:27:45.241Z",
    "number": "541190",
    "price": {
      "netAmount": "89.46",
      "vatPercentage": "19",
      "currency": "EUR",
      "totalDiscountPercent": "1.5",
      "vatAmount": "17.00",
      "grossAmount": "106.46"
    },
    "state": "ACCEPTED",
    "tapQuoteEnquiryId": "cWMQ8Z2zcyZesjauu",
    "supplierName": "24translate TEST",
    "target": "es-MX",
    "textAmount": {
      "type": "lines",
      "amount": 71,
      "discountedAmount": 70
    },
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "orderNumber": "SAL-541190",
    "id": "596880813e6b510001bb42fd"
  }
]

GET  /rest/api/translationTasks/{task_id}/targetDocuments

Returns a list of all targetDocuments of a translationTask which were delivered by the supplier. You should start poll this endpoint when the progress of a translationTask is set to "TRANSLATION_DELIVERED" Each returned document contains the id of the document. You can use this id to download the documents please see documents reference> for further information.

You can also download all documents as a zip-file using the endpoint GET /rest/api/translationTasks/{tsk_id}/targetDocuments/content.

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/targetDocuments HTTP/1.1

Example Response:

[
  {
    "length": 9868,
    "chunkSize": 261120,
    "uploadDate": "2017-07-14T10:44:36.748Z",
    "md5": "9660b950505a5b6c104971414d820c02",
    "filename": "Job 9 - fr-CH.merged.xlf",
    "contentType": "application/octet-stream;charset=UTF-8",
    "metadata": {
      "type": "target",
      "translationTaskId": "3xs8fFiBueQwFs9cN",
      "sourceDocumentId": "59687eda21b7620007c198a8",
      "translatedXliffDocumentId": "5968a08577fc5f00013ff335",
      "targetLanguage": "es-MX"
    },
    "id": "5968a094cd697b00013080c6"
  },
  {
    "length": 15840,
    "chunkSize": 261120,
    "uploadDate": "2017-07-14T10:44:39.324Z",
    "md5": "4f76be317649a29afe27be791be20358",
    "filename": "Job 11 - fr-CH.merged.xlf",
    "contentType": "application/octet-stream;charset=UTF-8",
    "metadata": {
      "type": "target",
      "translationTaskId": "3xs8fFiBueQwFs9cN",
      "sourceDocumentId": "59687ebc21b7620007c198a6",
      "translatedXliffDocumentId": "5968a08577fc5f00013ff333",
      "targetLanguage": "es-MX"
    },
    "id": "5968a097cd697b00013080c8"
  }
]

GET  /rest/api/translationTasks/{task_id}/targetDocuments/content

Gets all targetDocuments of the translationTask as a Zip file.

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/targetDocuments/content HTTP/1.1

Example Response:

... zip file content ...

GET  /rest/api/translationTasks/{task_id}/analysis

Returns the most recent analysis for the given translationTask.

See: Analysis Endpoint

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/analysis HTTP/1.1

Example Response:

{
  "id": "LFtaFrBA9HQcoNvqy",
  "translationTaskId": "57713b7e0f627d65ba122cef",
  "createdAt": "2017-03-21T15:26:19.790Z",
  "updatedAt": "2017-03-21T15:30:45.850Z",
  "state": "ANALYZED",
  "response": {
    "en-GB": {
      "resultTotal": "<<RESULT>>",
      "resultsByDocument": [
        "<<RESULT>>"
      ]
    },
    "ab-GE": {
      "resultTotal": "<<RESULT>>",
      "resultsByDocument" : [
        "<<RESULT>>"
      ]
    }
  }
}

GET  /rest/api/translationTasks/{task_id}/documentConversions

Returns the documentConversions for the given translationTask. There should be one object for each source document and target language combination. If the translationTask has two targetLanguages and three source documents there should be 6 document conversion objects.

Deprcated Property

convertedDocumentedId is deprecated, use transformedDocumentId instead

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/documentConversions HTTP/1.1

Example Response:

[
  {
    "createdAt": "2017-07-14T08:27:04.147Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687ebc21b7620007c198a6",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "nb-NO",
    "convertedDocumentId": "596880615aad29000176443c",
    "transformedDocumentId": "596880615aad29000176443c",
    "error": null,
    "id": "xfr2hrr7HjTf2m5tm"
  },
  {
    "createdAt": "2017-07-14T08:27:04.183Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687ebc21b7620007c198a6",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "es-MX",
    "convertedDocumentId": "596880665aad290001764440",
    "transformedDocumentId": "596880665aad290001764440",
    "state": "FAILED",
    "error": "<<ERROR OBJECT>>"
  },
  {
    "createdAt": "2017-07-14T08:27:04.199Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687eda21b7620007c198a8",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "es-MX",
    "convertedDocumentId": "596880615aad29000176443e",
    "transformedDocumentId": "596880615aad29000176443e",
    "error": null,
    "id": "ec5ZfoTyWEsZsFaHH"
  }
]

GET  /rest/api/translationTasks/{task_id}/documentPretranslations

Returns the documentPretranslations for the given translationTask. There should be one object for each source document and target language combination. If the translationTask has two targetLanguages and three source documents there should be 6 document pretranslation objects (If pretranslation is enabled and necessary).

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/documentPretranslations HTTP/1.1

Example Response:

[
  {
    "createdAt": "2017-07-14T08:27:04.147Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687ebc21b7620007c198a6",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "nb-NO",
    "transformedDocumentId": "596880615aad29000176443c",
    "error": null,
    "id": "xfr2hrr7HjTf2m5tm"
  },
  {
    "createdAt": "2017-07-14T08:27:04.183Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687ebc21b7620007c198a6",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "es-MX",
    "transformedDocumentId": "596880665aad290001764440",
    "state": "FAILED",
    "error": "<<ERROR OBJECT>>"
  },
  {
    "createdAt": "2017-07-14T08:27:04.199Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687eda21b7620007c198a8",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "es-MX",
    "transformedDocumentId": "596880615aad29000176443e",
    "error": null,
    "id": "ec5ZfoTyWEsZsFaHH"
  }
]

GET  /rest/api/translationTasks/{task_id}/documentReviews

Returns the documentReviews for the given translationTask. There should be one object for each source document and target language combination. If the translationTask has two targetLanguages and three source documents there should be 6 document review objects (If review is enabled).

Example Request:

GET /rest/api/translationTasks/57713b7e0f627d65ba122cef/documentReviews HTTP/1.1

Example Response:

[
  {
    "createdAt": "2017-07-14T08:27:04.147Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687ebc21b7620007c198a6",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "nb-NO",
    "transformedDocumentId": "596880615aad29000176443c",
    "error": null,
    "id": "xfr2hrr7HjTf2m5tm"
  },
  {
    "createdAt": "2017-07-14T08:27:04.183Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687ebc21b7620007c198a6",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "es-MX",
    "transformedDocumentId": "596880665aad290001764440",
    "state": "FAILED",
    "error": "<<ERROR OBJECT>>"
  },
  {
    "createdAt": "2017-07-14T08:27:04.199Z",
    "state": "DONE",
    "jobId": "Zunuwah8DQXxKC43a",
    "sourceDocumentId": "59687eda21b7620007c198a8",
    "translationTaskId": "3xs8fFiBueQwFs9cN",
    "sourceLanguage": "en-US",
    "targetLanguage": "es-MX",
    "transformedDocumentId": "596880615aad29000176443e",
    "error": null,
    "id": "ec5ZfoTyWEsZsFaHH"
  }
]

GET  /rest/api/translationTasks/{task_id}/translationDeliveries

Returns the translationDeliveries for the given translationTask. There should be one object for each accepted target language.

Example Request:

GET /rest/api/translationTasks/57137ef627d65ba122cef/translationDeliveries HTTP/1.1

Example Response:

[
  {
    "target": "en-GB",
    "translationTaskId": "PNuteGrkKrJtt8pY3c",
    "state": "DELIVERED",
    "targetDocumentIds": [
      "5ac338e421236900084509d4"
    ],
    "id": "we5tpMhgaLrtze2Qc"
  },
  {
    "target": "en-US",
    "translationTaskId": "PNuteGrkKrJtt8pY3c",
    "state": "DELIVERED",
    "targetDocumentIds": [
      "5ac3385435436900084509d6"
    ],
    "id": "btyhp5BBnAYenCXNG"
  }
]