cat task management API
editcat task management API
editThe cat task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible.
Returns information about tasks currently executing in the cluster, similar to the task management API.
Request
editGET /_cat/tasks
Description
editThe cat task management API returns information about tasks currently executing on one or more nodes in the cluster. It is a more compact view of the JSON task management API.
Query parameters
edit-
actions
-
(Optional, string) Comma-separated list or wildcard expression of actions used to limit the request.
Omit this parameter to return all actions.
-
detailed
-
(Optional, boolean)
If
true
, the response includes detailed information about shard recoveries. Defaults tofalse
. -
format
- (Optional, string) Short version of the HTTP accept header. Valid values include JSON, YAML, etc.
-
group_by
-
(Optional, string) Key used to group tasks in the response.
Possible values are:
-
nodes
- (Default) Node ID
-
parents
- Parent task ID
-
none
- Do not group tasks.
-
-
h
- (Optional, string) Comma-separated list of column names to display.
-
help
-
(Optional, boolean) If
true
, the response includes help information. Defaults tofalse
. -
node_id
- (Optional, string) Comma-separated list of node IDs or names used to limit returned information.
-
parent_task_id
-
(Optional, string) Parent task ID used to limit returned information.
To return all tasks, omit this parameter or use a value of
-1
. -
s
- (Optional, string) Comma-separated list of column names or column aliases used to sort the response.
-
time
- (Optional, time units) Unit used to display time values.
-
wait_for_completion
-
(Optional, boolean) If
true
, the request blocks until the operation is complete. Defaults totrue
. -
v
-
(Optional, boolean) If
true
, the response includes column headings. Defaults tofalse
.
Response codes
edit-
404
(Missing resources) -
If
<task_id>
is specified but not found, this code indicates that there are no resources that match the request.
Examples
editGET _cat/tasks?v
The API returns the following response:
action task_id parent_task_id type start_time timestamp running_time ip node cluster:monitor/tasks/lists[n] oTUltX4IQMOUUVeiohTt8A:124 oTUltX4IQMOUUVeiohTt8A:123 direct 1458585884904 01:48:24 44.1micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A cluster:monitor/tasks/lists oTUltX4IQMOUUVeiohTt8A:123 - transport 1458585884904 01:48:24 186.2micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A