The task management API returns information about tasks currently executing on one or more nodes in the cluster Technical preview
Query parameters
-
actions string | array[string]
Comma-separated list or wildcard expression of actions used to limit the request.
-
detailed boolean
If
true
, the response includes detailed information about shard recoveries. -
group_by string
Key used to group tasks in the response.
Values are
nodes
,parents
, ornone
. -
node_id array[string]
Comma-separated list of node IDs or names used to limit returned information.
-
parent_task_id string
Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of
-1
. -
master_timeout string
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
-
timeout string
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 operation is complete.
curl \
-X GET http://api.example.com/_tasks
{
"nodes" : {
"oTUltX4IQMOUUVeiohTt8A" : {
"name" : "H5dfFeA",
"transport_address" : "127.0.0.1:9300",
"host" : "127.0.0.1",
"ip" : "127.0.0.1:9300",
"tasks" : {
"oTUltX4IQMOUUVeiohTt8A:124" : {
"node" : "oTUltX4IQMOUUVeiohTt8A",
"id" : 124,
"type" : "direct",
"action" : "cluster:monitor/tasks/lists[n]",
"start_time_in_millis" : 1458585884904,
"running_time_in_nanos" : 47402,
"cancellable" : false,
"parent_task_id" : "oTUltX4IQMOUUVeiohTt8A:123"
},
"oTUltX4IQMOUUVeiohTt8A:123" : {
"node" : "oTUltX4IQMOUUVeiohTt8A",
"id" : 123,
"type" : "transport",
"action" : "cluster:monitor/tasks/lists",
"start_time_in_millis" : 1458585884904,
"running_time_in_nanos" : 236042,
"cancellable" : false
}
}
}
}
}