Check reindex status API

edit

[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Check the status of the reindex operation.

Request

edit

GET /api/upgrade_assistant/reindex/myIndex

Response codes

edit
200
Indicates a successful call.

Example

edit

The API returns the following:

{
  "reindexOp": {
    "indexName": ".ml-state",
    "newIndexName": ".reindexed-v7-ml-state", 
    "status": 0, 
    "lastCompletedStep": 40, 
    "reindexTaskId": "QprwvTMzRQ2MLWOW22oQ4Q:11819", 
    "reindexTaskPercComplete": 0.3, 
    "errorMessage": null 
  },
  "warnings": [], 
  "hasRequiredPrivileges": true 
}

Name of the new index that is being created.

Current status of the reindex. For details, see Status codes.

Last successfully completed step of the reindex. For details, see Step codes table.

Task ID of the reindex task in Elasticsearch. Only present if reindexing has started.

Percentage of how far the reindexing task in Elasticsearch has progressed, in decimal from from 0 to 1.

Error that caused the reindex to fail, if it failed.

An array of any warning codes explaining what changes are required for this reindex. For details, see Warning codes.

Specifies if the user has sufficient privileges to reindex this index. When security is unavailable or disables, returns true.

Status codes

edit
0
In progress
1
Completed
2
Failed
3
Paused NOTE: If the Kibana node that started the reindex is shutdown or restarted, the reindex goes into a paused state after some time. To resume the reindex, you must submit a new POST request to the /api/upgrade_assistant/reindex/<indexName> endpoint.
4
Cancelled

Step codes

edit
0
The reindex operation has been created in Kibana.
10
The index group services stopped. Only applies to some system indices.
20
The index is set to readonly.
30
The new destination index has been created.
40
The reindex task in Elasticsearch has started.
50
The reindex task in Elasticsearch has completed.
60
Aliases were created to point to the new index, and the old index has been deleted.
70
The index group services have resumed. Only applies to some system indices.

Warning codes

edit
0
Specifies to remove the _all meta field.
1
Specifies to convert any coerced boolean values in the source document. For example, yes, 1, and off.
2
Specifies to convert documents to support Elastic Common Schema. Only applies to APM indices created in 6.x.