Get task information
Technical preview
Get information about a task currently running in the cluster.
WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible.
If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.
Path parameters
-
task_id
string Required The task identifier.
Query parameters
-
timeout
string The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
-
wait_for_completion
boolean If
true
, the request blocks until the task has completed.
GET
/_tasks/{task_id}
curl \
--request GET http://api.example.com/_tasks/{task_id} \
--header "Authorization: $API_KEY"
Response examples (200)
{
"completed": true,
"additionalProperty1": {
"action": "string",
"cancelled": true,
"cancellable": true,
"description": "string",
"headers": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"id": 42.0,
"node": "string",
"running_time": "string",
"": "string",
"status": {},
"type": "string"
},
"additionalProperty2": {
"action": "string",
"cancelled": true,
"cancellable": true,
"description": "string",
"headers": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"id": 42.0,
"node": "string",
"running_time": "string",
"": "string",
"status": {},
"type": "string"
},
"response": {},
"error": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
}
}