pending_tasks.asciidoc 2.4 KB

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