elasticsearch/docs/reference/migration/apis/data-stream-reindex-cancel.asciidoc
Parker Timmins ba7d38ade9
Add docs for reindex data stream REST endpoints (#120653) (#121121)
Add documentation for new REST endpoints related to data stream upgrade. 
Endpoints:
- /_migration/reindex
- /_migration/reindex/{index}/_status
- /_migration/reindex/{index}/_cancel
- /_create_from/{source}/{dest}
2025-01-29 20:50:46 +11:00

64 lines
1.9 KiB
Text

[role="xpack"]
[[data-stream-reindex-cancel-api]]
=== Reindex data stream cancel API
++++
<titleabbrev>Reindex data stream cancel</titleabbrev>
++++
.New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-migration[Migration APIs].
--
include::{es-ref-dir}/migration/apis/shared-migration-apis-tip.asciidoc[]
Cancels a running data stream reindex task which was started by the <<data-stream-reindex-api, data stream reindex API>>.
Any backing indices that have already been reindexed and swapped into the data stream will remain in the data stream.
Only backing indices which are currently being reindexed, or pending backing indices which are still waiting to be reindexed, will be cancelled.
Once a data stream reindex task is cancelled it will no longer be accessible through the
<<data-stream-reindex-status-api,status API>>. If a reindex task is not currently running
this API will return `resource_not_found_exception`.
///////////////////////////////////////////////////////////
[source,console]
------------------------------------------------------
POST _migration/reindex
{
"source": {
"index": "my-data-stream"
},
"mode": "upgrade"
}
------------------------------------------------------
// TESTSETUP
// TEST[setup:my_data_stream]
///////////////////////////////////////////////////////////
[source,console]
----
POST _migration/reindex/my-data-stream/_cancel
----
// TEST[teardown:data_stream_cleanup]
[[data-stream-reindex-cancel-request]]
==== {api-request-title}
`GET /_migration/reindex/<data-stream>/_cancel`
[[data-stream-reindex-cancel-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, you must have the `manage`
<<privileges-list-indices,index privilege>> for the data stream.
[[data-stream-reindex-cancel-path-params]]
==== {api-path-parms-title}
`<data-stream>`::
(Required, string)
Name of data stream to cancel reindexing.