[[start-resume-reindex]]
=== Start or resume reindex API
++++
Start or resume reindex
++++
experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]
Start a new reindex or resume a paused reindex. Following steps are performed during
a reindex task:
. Setting the index to read-only
. Creating a new index
. {ref}/docs-reindex.html[Reindexing] documents into the new index
. Creating an index alias for the new index
. Deleting the old index
[[start-resume-reindex-request]]
==== Request
`POST :/api/upgrade_assistant/reindex/myIndex`
[[start-resume-reindex-codes]]
==== Response code
`200`::
Indicates a successful call.
[[start-resume-reindex-example]]
==== Example
The API returns the following:
[source,sh]
--------------------------------------------------
{
"indexName": ".ml-state",
"newIndexName": ".reindexed-v7-ml-state", <1>
"status": 0, <2>
"lastCompletedStep": 0, <3>
"reindexTaskId": null, <4>
"reindexTaskPercComplete": null, <5>
"errorMessage": null <6>
}
--------------------------------------------------
<1> The name of the new index.
<2> The reindex status. For more information, refer to <>.
<3> The last successfully completed step of the reindex. For more information, refer to <>.
<4> The task ID of the {ref}/docs-reindex.html[reindex] task in {es}. Appears when the reindexing starts.
<5> The progress of the {ref}/docs-reindex.html[reindexing] task in {es}. Appears in decimal form, from 0 to 1.
<6> The error that caused the reindex to fail, if it failed.