Resolve index APIedit

Resolves the specified name(s) and/or wildcard expression(s) to indices, index aliases, and data streams. Multiple expressions and remote clusters are supported.

GET /_resolve/index/my-index-*

Requestedit

GET /_resolve/index/<name>

Path parametersedit

<name>

(Required, string) Comma-separated name(s) or wildcard expression(s) of the indices, index aliases, and data streams to resolve. Resources on remote clusters can be specified using the <cluster>:<name> syntax.

Query parametersedit

expand_wildcards

(Optional, string) Controls what kind of indices that wildcard expressions can expand to. Multiple values are accepted when separated by a comma, as in open,hidden. Valid values are:

all
Expand to open and closed indices, including hidden indices.
open
Expand only to open indices.
closed
Expand only to closed indices.
hidden
Expansion of wildcards will include hidden indices. Must be combined with open, closed, or both.
none
Wildcard expressions are not accepted.

Defaults to open.

Examplesedit

GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all

The API returns the following response:

{
  "indices": [                                 
    {
      "name": "foo_closed",
      "attributes": [
        "closed"
      ]
    },
    {
      "name": "freeze-index",
      "aliases": [
        "f-alias"
      ],
      "attributes": [
        "frozen",
        "open"
      ]
    },
    {
      "name": "remoteCluster1:bar-01",
      "attributes": [
        "open"
      ]
    }
  ],
  "aliases": [                                 
    {
      "name": "f-alias",
      "indices": [
        "freeze-index",
        "my-index-000001"
      ]
    }
  ],
  "data_streams": [                            
    {
      "name": "foo",
      "backing_indices": [
        ".ds-foo-000001"
      ],
      "timestamp_field": "@timestamp"
    }
  ]
}

All indices matching the supplied names or expressions

All aliases matching the supplied names or expressions

All data streams matching the supplied names or expressions