data-stream-reindex-cancel.asciidoc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. [role="xpack"]
  2. [[data-stream-reindex-cancel-api]]
  3. === Reindex data stream cancel API
  4. ++++
  5. <titleabbrev>Reindex data stream cancel</titleabbrev>
  6. ++++
  7. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-migration[Migration APIs].
  11. --
  12. include::{es-ref-dir}/migration/apis/shared-migration-apis-tip.asciidoc[]
  13. Cancels a running data stream reindex task which was started by the <<data-stream-reindex-api, data stream reindex API>>.
  14. Any backing indices that have already been reindexed and swapped into the data stream will remain in the data stream.
  15. Only backing indices which are currently being reindexed, or pending backing indices which are still waiting to be reindexed, will be cancelled.
  16. Once a data stream reindex task is cancelled it will no longer be accessible through the
  17. <<data-stream-reindex-status-api,status API>>. If a reindex task is not currently running
  18. this API will return `resource_not_found_exception`.
  19. ///////////////////////////////////////////////////////////
  20. [source,console]
  21. ------------------------------------------------------
  22. POST _migration/reindex
  23. {
  24. "source": {
  25. "index": "my-data-stream"
  26. },
  27. "mode": "upgrade"
  28. }
  29. ------------------------------------------------------
  30. // TESTSETUP
  31. // TEST[setup:my_data_stream]
  32. ///////////////////////////////////////////////////////////
  33. [source,console]
  34. ----
  35. POST _migration/reindex/my-data-stream/_cancel
  36. ----
  37. // TEST[teardown:data_stream_cleanup]
  38. [[data-stream-reindex-cancel-request]]
  39. ==== {api-request-title}
  40. `GET /_migration/reindex/<data-stream>/_cancel`
  41. [[data-stream-reindex-cancel-prereqs]]
  42. ==== {api-prereq-title}
  43. * If the {es} {security-features} are enabled, you must have the `manage`
  44. <<privileges-list-indices,index privilege>> for the data stream.
  45. [[data-stream-reindex-cancel-path-params]]
  46. ==== {api-path-parms-title}
  47. `<data-stream>`::
  48. (Required, string)
  49. Name of data stream to cancel reindexing.