---
type: api
title: Get the dangling indices
description: If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices
products:
  - Elasticsearch
---

# Get the dangling indices

Availability: 7.9+

## Paths

- `GET` `/_dangling`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#bearerauth)

## 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.

## Required authorization

* Cluster privileges: `manage`

## Response

`application/json`

- `dangling_indices` ([] DanglingIndex)
  - `index_name` (string)
  - `index_uuid` (string)
  - `creation_date_millis` (EpochTimeUnitMillis)
  - `node_ids` (string Ids)
## Code Examples

#### Console

```console
GET /_dangling
```

#### JavaScript

```javascript
const response = await client.danglingIndices.listDanglingIndices();
```

#### Python

```python
resp = client.dangling_indices.list_dangling_indices()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_dangling" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.danglingIndices().listDanglingIndices();
```

#### C#

```c#
var response = await client.DanglingIndices.ListDanglingIndicesAsync();
```

#### PHP

```php
$resp = $client->danglingIndices()->listDanglingIndices();
```

#### Ruby

```ruby
response = client.dangling_indices.list_dangling_indices
```

## Response Examples

#### List dangling indices response example1

```json
{
  "dangling_indices": [
   {
    "index_name": "my-index-000001",
    "index_uuid": "zmM4e0JtBkeUjiHD-MihPQ",
    "creation_date_millis": 1589414451372,
    "node_ids": [
      "pL47UN3dAb2d5RCWP6lQ3e"
    ]
   }
  ]
}
```

