Reindex legacy backing indices Generally available; Added in 8.18.0

POST /_migration/reindex

Reindex all legacy backing indices for a data stream. This operation occurs in a persistent task. The persistent task ID is returned immediately and the reindexing work is completed in that task.

About reindexing data streams
application/json

Body Required

  • mode string Required

    Reindex mode. Currently only 'upgrade' is supported.

    Value is upgrade.

  • source object Required

    The source index or data stream (only data streams are currently supported).

    Hide source attribute Show source attribute object
    • index string Required

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

POST /_migration/reindex
curl \
 --request POST 'http://api.example.com/_migration/reindex' \
 --header "Content-Type: application/json" \
 --data '"{\n    \"source\": {\n        \"index\": \"my-data-stream\"\n    },\n    \"mode\": \"upgrade\"\n}"'
Request example
An example body for a `POST _migration/reindex` request.
{
    "source": {
        "index": "my-data-stream"
    },
    "mode": "upgrade"
}