List dangling indices API

List dangling indices API

New API reference

For the most up-to-date API details, refer to Index APIs.

Lists dangling indices.

Request

  1. resp = client.dangling_indices.list_dangling_indices()
  2. print(resp)
  1. response = client.dangling_indices.list_dangling_indices
  2. puts response
  1. const response = await client.danglingIndices.listDanglingIndices();
  2. console.log(response);
  1. GET /_dangling

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the manage cluster privilege to use this API.

Description

If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than cluster.indices.tombstones.size indices while an Elasticsearch node is offline.

Use this API to list dangling indices, which you can then import or delete.

Examples

The API returns the following response:

  1. {
  2. "dangling_indices": [
  3. {
  4. "index_name": "my-index-000001",
  5. "index_uuid": "zmM4e0JtBkeUjiHD-MihPQ",
  6. "creation_date_millis": 1589414451372,
  7. "node_ids": [
  8. "pL47UN3dAb2d5RCWP6lQ3e"
  9. ]
  10. }
  11. ]
  12. }