Tasks
Task object
Definition
Some endpoints do not return a direct response. Instead they return a task_id
which will contain the results once ready. In most cases you will need to get the task until the status is not pending
. The status will then either be:
success
: in which case you can read thedata
field to access the expected response.error
: in which case theerror
field will contain an error message and thedata
field will be null.
Attribute | Type | Description |
id | string | The task ID |
status | string | The task status, either |
error | string | Defined in case of error, it is the error message |
date_created | string | The creation data timestamp |
date_updated | string | The timestamp where status switched from "pending" to another status |
data | object | The response JSON of the endpoint that generated the task |
Response
Get single task status
Definition
This endpoint retrieves the state of a given task.
Arguments
Parameter | Type | Default | Description |
task_id | string | The task ID |
Code sample
Response
It returns a task object.
Get multiple task status
Definition
Retrieve several tasks status given their IDs.
Arguments
Parameter | Type | Default | Description |
task_ids | array(string) | The task IDs as a JSON array of strings |
Code sample
Response
A paginated list of task objects.
Attribute | Type | Description |
count | int | The total number of results. |
next | string | The URL to the next page. |
previous | string | The URL to the previous page. |
results | array(object) | A list of task objects. |
Last updated