RWS Logo
Show / Hide Table of Contents

Cancelling an Asynchronous Translation

This call registers a cancellation request for a translation, by calling the endpoint described below. The translation cannot be cancelled if it is in one of the following states: DONE, FAILED. Call the Translation Status afterwards for confirmation.

Linux

curl -XPOST \
   -H "Authorization:Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" \
   -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" \
 'https://api.languageweaver.com/v4/mt/translations/async/gfui83oah/cancel'
Windows

curl -XPOST^
 -H "Authorization:Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI"^
 -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555"^
 https://api.languageweaver.com/v4/mt/translations/async/gfui83oah/cancel

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
POST /v4/mt/translations/async/gfui83oah/cancel

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Response JSON:

{
  "requestId": "gfui83oah"
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
requestId string The id of the translation request
{
   "errors":[
      {
         "code":63,
         "description":"Cannot cancel translation, status is already: DONE"
      }
   ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
202 When the cancel translation request has been registered
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error
In this page
Back to top