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.

typeidAlso needsPermission
PROJECT_INGESTIONthe projectPROJECT_get_by_id
PROJECT_TRANSLATIONS_DOWNLOADthe request of Download Project Translations AsyncprojectUuidPROJECT_get_by_id
ZIP_EXTRACTIONthe task of Extract ZIP ResourceprojectUuidPROJECT_RESOURCE_create
LOGFILEthe logfileprojectUuidPROJECT_get_by_id
TRANSLATION_KIT_JOBthe jobprojectUuidPROJECT_download_files or PROJECT_export_import_file
WORK_UNIT_IMPORTthe importprojectUuid, workUnitUuidPROJECT_export_import_file
WORK_UNIT_TM_UPDATEthe job of Export Work Unit TM UpdatesprojectUuid, workUnitUuidPROJECT_export_import_file
TM_JOBthe TM import or export jobTM_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 string
The operation type, e.g. TRANSLATION_KIT_JOB (dashes and lower case are accepted).
idrequired string
The 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.

OperationStatus

id string
The operation's id, as given in the path.
state stringRUNNING COMPLETED FAILED
RUNNING until the operation ends, then COMPLETED or FAILED.
statusUrl string
The 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"
}