reference
Operations
1 endpoint
GET/api/v3/operations/{type}/{id}
Get Operation Status
Requires one of: PROJECT_get_by_id PROJECT_RESOURCE_create PROJECT_download_files PROJECT_export_import_file TM_get_by_id
Reports any long-running operation in the same terms: state is RUNNING until it ends, then COMPLETED or FAILED. For the details (counts, download links, errors), call the operation's own status call at statusUrl. Nothing changes in the operation's own call.
type | id | Also needs | Permission |
|---|---|---|---|
PROJECT_INGESTION | the project | PROJECT_get_by_id | |
PROJECT_TRANSLATIONS_DOWNLOAD | the request of Download Project Translations Async | projectUuid | PROJECT_get_by_id |
ZIP_EXTRACTION | the task of Extract ZIP Resource | projectUuid | PROJECT_RESOURCE_create |
LOGFILE | the logfile | projectUuid | PROJECT_get_by_id |
TRANSLATION_KIT_JOB | the job | projectUuid | PROJECT_download_files or PROJECT_export_import_file |
WORK_UNIT_IMPORT | the import | projectUuid, workUnitUuid | PROJECT_export_import_file |
WORK_UNIT_TM_UPDATE | the job of Export Work Unit TM Updates | projectUuid, workUnitUuid | PROJECT_export_import_file |
TM_JOB | the TM import or export job | TM_get_by_id |
The caller must be able to read the operation through its own status call. An unknown type, an id of the wrong form or a missing projectUuid/workUnitUuid answers 400; an operation that does not exist, has expired, or belongs to another project answers 404.
path parameters
typerequired |
stringThe operation type, e.g. TRANSLATION_KIT_JOB (dashes and lower case are accepted). |
idrequired |
stringThe id the call that started the operation returned. |
query parameters
projectUuid |
string (uuid)The project of the operation. Required for every type but PROJECT_INGESTION and TM_JOB. |
workUnitUuid |
string (uuid)The work unit of the operation. Required for WORK_UNIT_IMPORT and WORK_UNIT_TM_UPDATE. |
Responses
200 The state of the operation.
id |
stringThe operation's id, as given in the path. |
state |
stringRUNNING COMPLETED FAILEDRUNNING until the operation ends, then COMPLETED or FAILED. |
statusUrl |
stringThe path of the operation's own status call, which has the details: counts, download links, errors. |
type |
stringPROJECT_INGESTION PROJECT_TRANSLATIONS_DOWNLOAD ZIP_EXTRACTION LOGFILE TRANSLATION_KIT_JOB WORK_UNIT_IMPORT WORK_UNIT_TM_UPDATE TM_JOB |
Request
curl -X GET 'https://app.wxrks.com/api/v3/operations/TRANSLATION_KIT_JOB/7c2e4b1a-9f3d-4e8a-b6c5-1d2f3a4b5c6d' \
-H "X-AUTH-TOKEN: $WXRKS_TOKEN"
Response 200
{
"id": "7c2e4b1a-9f3d-4e8a-b6c5-1d2f3a4b5c6d",
"state": "COMPLETED",
"statusUrl": "/api/v3/project/0b8f6c2e-3a4d-4f5b-8c7d-9e1f2a3b4c5d/translation-kit-job/7c2e4b1a-9f3d-4e8a-b6c5-1d2f3a4b5c6d",
"type": "TRANSLATION_KIT_JOB"
}