Get Task
The Task API provides a method for getting a specific task by ID
This API allows users to monitor the status of tasks running against an index.
Method |
GET |
URL |
/v1/task/<task_id> |
Authentication required? |
Yes |
Required Roles |
|
Response Body |
a Task document |
Authentication & Authorization
Tokens for this call must have one of these scopes.
urn:globus:auth:scope:search.api.globus.org:all urn:globus:auth:scope:search.api.globus.org:ingest
You must have the owner
, admin
or writer
role on the index for the task.
Examples
To look up a task with an ID of 05c1ec1b-2400-44e2-9797-922c29199042
:
curl 'https://search.api.globus.org/v1/task/05c1ec1b-2400-44e2-9797-922c29199042'
Response Schemas
Task
Field Name | Type | Description |
---|---|---|
task_id |
UUID |
The ID of the Task |
state |
String |
The status of the Task. See the Task States table for possible values |
task_type |
String |
Task discriminator key; one of "ingest", "delete-by-subject", "delete-by-query", or "delete-by-entry-id" |
state_description |
String |
A short description of the state value |
index_id |
UUID |
The ID of the Index which is the target of this task |
message |
String (optional) |
A description of the Task, possibly an error message |
additional_details |
Object (optional) |
Added information about the task which cannot be encoded into the message. Usually only populated on failures to include error information. |
creation_date |
String |
The time at which the task was submitted (created) |
completion_date |
String |
The time at which the task was completed |
{
"task_id": "05c1ec1b-2400-44e2-9797-922c29199042",
"state": "SUCCESS",
"task_type": "ingest",
"state_description": "Task succeeded",
"index_id": "696af25c-8c24-469a-b5e0-67d3e4b71df7",
"message": null,
"creation_date": "2018-12-13T18:08:42.746911",
"completion_date": "2018-12-13T18:08:44.539611",
"additional_details": null
}
Task States
CREATING |
The task is still being initialized |
PENDING |
The task hasn’t started yet, it is waiting in the queue |
PROGRESS |
The task has started, but has not yet completed. Search queries may retrieve some of the contents which have been processed |
SUCCESS |
The task completed without errors or with only temporary errors which resolved |
FAILED |
The task failed to complete. Partial data may have been processed |