pending_tasks.asciidoc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. [[cat-pending-tasks]]
  2. === cat pending tasks API
  3. ++++
  4. <titleabbrev>cat pending tasks</titleabbrev>
  5. ++++
  6. Returns cluster-level changes that have not yet been executed, similar to the
  7. <<cluster-pending, pending cluster tasks>> API.
  8. [[cat-pending-tasks-api-request]]
  9. ==== {api-request-title}
  10. `GET /_cat/pending_tasks`
  11. [[cat-pending-tasks-api-prereqs]]
  12. ==== {api-prereq-title}
  13. * If the {es} {security-features} are enabled, you must have the `monitor` or
  14. `manage` <<privileges-list-cluster,cluster privilege>> to use this API.
  15. [[cat-pending-tasks-api-query-params]]
  16. ==== {api-query-parms-title}
  17. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=http-format]
  18. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=cat-h]
  19. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=help]
  20. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
  21. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  22. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=cat-s]
  23. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=time]
  24. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=cat-v]
  25. [[cat-pending-tasks-api-example]]
  26. ==== {api-examples-title}
  27. [source,console]
  28. --------------------------------------------------
  29. GET /_cat/pending_tasks?v=true
  30. --------------------------------------------------
  31. The API returns the following response:
  32. [source,txt]
  33. --------------------------------------------------
  34. insertOrder timeInQueue priority source
  35. 1685 855ms HIGH update-mapping [foo][t]
  36. 1686 843ms HIGH update-mapping [foo][t]
  37. 1693 753ms HIGH refresh-mapping [foo][[t]]
  38. 1688 816ms HIGH update-mapping [foo][t]
  39. 1689 802ms HIGH update-mapping [foo][t]
  40. 1690 787ms HIGH update-mapping [foo][t]
  41. 1691 773ms HIGH update-mapping [foo][t]
  42. --------------------------------------------------
  43. // TESTRESPONSE[s/(\n.+)+/(\\n.+)*/ non_json]
  44. // We can't assert anything about the tasks in progress here because we don't
  45. // know what might be in progress....