Retrieves a task¶
Method¶
GET https://papi.afi.ai/api/v1/tenants/{tenant_id}/tasks/{task_id}
Description¶
Retrieves a task object by its ID.
Polling of task status to wait its completion should be done with an exponentially growing timeout starting with a minimum of 15 seconds and up to 4 minutes (15s, 30s, 60s, 2min, 4min). Requesting task status more frequently is useless as its cached and returned state won't change sooner than that, but can increase probability of getting 429 error for exceeding request rate limits.
Path params¶
tenant_id
string
required
Tenant where the task belongs to. |
task_id
string
required
ID of the task to retrieve. |
curl -X GET \
-H 'Authorization: {api-key}' \
https://papi.afi.ai/api/v1/tenants/{tenant_id}/tasks/{task_id}
Successful response (200) schema¶
object
Task describes a single task object. |
id
string
Task ID. |
resource_id
string
ID of the resource with which the task is associated. |
status
string
Task status (open, inprogress, done, failed, suspended, warnings, canceled). done, failed, warnings and canceled status are terminal states. **warnings** status implies that the task was completed, but with some warnings which might require attention. |