Get task information
- GET /_tasks/{task_id}
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.
- Cluster privileges:
monitor
Path Parameters
-
task_idstring Idrequired -
The task identifier.
Query Parameters
-
timeoutstring Duration · default: 30s 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_completionboolean · default: false If
true, the request blocks until the task has completed.
Response
-
completedbooleanrequired -
taskTaskInforequired -
actionstringrequired -
cancelledboolean -
cancellablebooleanrequired -
descriptionstring -
Human readable text that identifies the particular request that the task is performing. For example, it might identify the search request being performed by a search task. Other kinds of tasks have different descriptions, like
_reindexwhich has the source and the destination, or_bulkwhich just has the number of requests and the destination indices. Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request. -
headersmap string to stringrequired -
idnumberrequired -
nodestringrequired -
running_timestring Duration -
running_time_in_nanosDurationValueUnitNanosrequired -
start_time_in_millisEpochTimeUnitMillisrequired -
statusobject -
The internal status of the task, which varies from task to task. The format also varies. While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.
-
typestringrequired -
parent_task_idnumber | string TaskId -
responseobject -
errorErrorCause -
typestringrequired -
The type of error
-
reasonstringnullable -
A human-readable explanation of the error, in English.
-
stack_tracestring -
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
caused_byErrorCause -
root_causeErrorCause -
suppressedErrorCause