pending_tasks.asciidoc 2.3 KB

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