Clinia
RegistryTask

Get a task from the registry

GET
/sources/{sourceKey}/v1/tasks/{taskId}

Get the operation receipts related to a task id.

headerX-Clinia-API-Key<token>
sourceKey*string

The source key.

taskId*string

The task id.

withReceipts?boolean

If set to true, the operation receipts of the task will be included in the response. Else only the status of the task will be returned.

Defaultfalse

Response Body

The task with the given id.

application/json
  1. response
status*v1TaskStatus

Status of the task.

  • SUCCESS: All the operations of the task completed successfully.
  • PENDING: At least one operation in the task is still pending.
  • CANCELLED: All the operations in the task were cancelled.
  • FAILURE: At least one operations failed or was cancelled.
Value in"SUCCESS""PENDING""CANCELLED""FAILURE"
taskId*v1TaskId

The task identifier. Used to track an async task in the system. Use the task ID to poll for completion status. The taskId holds different prefix to represent different tasks.

  • oneOf task: s_<id>.
  • bulk task: bk_<id> (deprecated: <id> only).
  • bundle task: bd_<id> (deprecated: <id> only).
  • purge task: pg_<id> (deprecated: purge:<id>).
receipts?array<|>
Example Request
curl -X GET 'https://api..clinia.cloud/sources/string/v1/tasks/string'
Example Response
{  "status": "SUCCESS",  "taskId": "string",  "receipts": [    {      "receivedAt": "2019-08-24T14:15:22Z",      "completedAt": "2019-08-24T14:15:22Z",      "taskId": "string",      "action": "CREATE",      "status": "SUCCESS",      "error": {        "code": 400,        "message": "string",        "type": "ALREADY_EXISTS",        "details": [          {}        ],        "additionalContext": {}      },      "pipelineExecution": {        "id": "string",        "pipelineDefinitionId": "string",        "status": "SUCCESSFUL"      },      "targetType": "RELATIONSHIP",      "id": "string",      "type": "string"    }  ]}