2019-10-01 12:22:50 -04:00
[[cat-tasks]]
=== cat task management API
++++
<titleabbrev>cat task management</titleabbrev>
++++
2020-01-30 08:15:05 -05:00
beta::["The 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.",{issue}51628]
2019-10-01 12:22:50 -04:00
Returns information about tasks currently executing in the cluster,
similar to the <<tasks,task management>> API.
[[cat-tasks-api-request]]
==== {api-request-title}
2019-11-25 09:36:38 -05:00
`GET /_cat/tasks`
2019-10-01 12:22:50 -04:00
[[cat-tasks-api-desc]]
==== {api-description-title}
The 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 <<tasks,task management>> API.
[[cat-tasks-api-query-params]]
==== {api-query-parms-title}
include::{docdir}/rest-api/common-parms.asciidoc[tag=actions]
include::{docdir}/rest-api/common-parms.asciidoc[tag=detailed]
include::{docdir}/rest-api/common-parms.asciidoc[tag=http-format]
include::{docdir}/rest-api/common-parms.asciidoc[tag=group-by]
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-h]
include::{docdir}/rest-api/common-parms.asciidoc[tag=help]
include::{docdir}/rest-api/common-parms.asciidoc[tag=node-id-query-parm]
include::{docdir}/rest-api/common-parms.asciidoc[tag=parent-task-id]
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-s]
2019-10-10 09:48:40 -04:00
include::{docdir}/rest-api/common-parms.asciidoc[tag=time]
2019-10-01 12:22:50 -04:00
include::{docdir}/rest-api/common-parms.asciidoc[tag=wait_for_completion]
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-v]
[[cat-tasks-api-response-codes]]
==== {api-response-codes-title}
include::{docdir}/cluster/tasks.asciidoc[tag=tasks-api-404]
[[cat-tasks-api-examples]]
==== {api-examples-title}
[source,console]
----
GET _cat/tasks?v
----
// TEST[skip:No tasks to retrieve]
The API returns the following response:
[source,console-result]
----
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
----
// TESTRESPONSE[skip:No tasks to retrieve]
// TESTRESPONSE[non_json]