elasticsearch/docs/reference/cat/pending_tasks.asciidoc
Lisa Cawley 5e0fbef58b
[DOCS] Link to new API site (#119038)
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2024-12-30 16:52:16 +00:00

76 lines
2.4 KiB
Text

[[cat-pending-tasks]]
=== cat pending tasks API
++++
<titleabbrev>cat pending tasks</titleabbrev>
++++
..New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-cat[Compact and aligned text (CAT) APIs]..
--
[IMPORTANT]
====
cat APIs are only intended for human consumption using the command line or {kib}
console. They are _not_ intended for use by applications. For application
consumption, use the <<cluster-pending,pending cluster tasks API>>.
====
Returns <<cluster-state-publishing,cluster-level changes>> that have not yet been executed.
[[cat-pending-tasks-api-request]]
==== {api-request-title}
`GET /_cat/pending_tasks`
[[cat-pending-tasks-api-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, you must have the `monitor` or
`manage` <<privileges-list-cluster,cluster privilege>> to use this API.
[[cat-pending-tasks-api-query-params]]
==== {api-query-parms-title}
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=http-format]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-h]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=help]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-s]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=time]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-v]
[[cat-pending-tasks-api-example]]
==== {api-examples-title}
[source,console]
--------------------------------------------------
GET /_cat/pending_tasks?v=true
--------------------------------------------------
The API returns the following response:
[source,txt]
--------------------------------------------------
insertOrder timeInQueue priority source
1685 855ms HIGH update-mapping [foo][t]
1686 843ms HIGH update-mapping [foo][t]
1693 753ms HIGH refresh-mapping [foo][[t]]
1688 816ms HIGH update-mapping [foo][t]
1689 802ms HIGH update-mapping [foo][t]
1690 787ms HIGH update-mapping [foo][t]
1691 773ms HIGH update-mapping [foo][t]
--------------------------------------------------
// TESTRESPONSE[s/(\n.+)+/(\\n.+)*/ non_json]
// We can't assert anything about the tasks in progress here because we don't
// know what might be in progress....