tasks_retrieve
GET
/api/tasks/{task_id}
const url = 'https://example.com/api/tasks/example';const options = { method: 'GET', headers: { 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/tasks/example \ --header 'Authorization: Bearer <token>' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'Retrieve a task item’s information.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”task_id
required
Celery ID for the Task that was run
string
Header Parameters
Section titled “Header Parameters”X-Workspace
required
string format: uuid
Workspace ID
Responses
Section titled “Responses”Media typeapplication/json
Serializer for handling task-related data.
object
date_created
required
Created DateTime
Datetime field when the task result was created in UTC
string format: date-time
date_done
required
Completed DateTime
Datetime field when the task was completed in UTC
string format: date-time
status
required
Task State
Current state of the task being run
FAILURE- FAILUREPENDING- PENDINGRECEIVED- RECEIVEDRETRY- RETRYREVOKED- REVOKEDSTARTED- STARTEDSUCCESS- SUCCESS
string
task_id
required
Celery ID for the Task that was run
string
task_name
required
Name of the Task which was run
string
task_kwargs
required
result
required
Return the report of a task that succeeded, when it is meant for the caller.
Parameters
obj : TaskResult The task being serialized.
Returns
dict | None
The report, or None while the task is not over, when it failed,
and for the tasks whose result is not public.
object
key
additional properties
Example
{ "status": "FAILURE"}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "body_validation_error", "message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.", "details": [ { "parameter": "<parameter>", "code": "not_supported", "message": "This field is not supported." } ]}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "forbidden", "message": "You do not have permission to perform this operation. Check the `details` property for more details.", "details": [ { "parameter": "object", "code": "not_allowed", "message": "You are not a member of this object." } ]}
