[[indices-resolve-index-api]]
=== Resolve index API
++++
<titleabbrev>Resolve index</titleabbrev>
++++

.New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs].
--

Resolves the specified name(s) and/or index patterns for indices, aliases, and
data streams. Multiple patterns and remote clusters are supported.

////
[source,console]
----
PUT /foo_closed

POST /foo_closed/_close

PUT /remotecluster-bar-01

PUT /freeze-index

PUT /my-index-000001

PUT /freeze-index/_alias/f-alias

PUT /my-index-000001/_alias/f-alias

PUT /_index_template/foo_data_stream
{
  "index_patterns": [ "foo" ],
  "data_stream": { }
}

PUT /_data_stream/foo
----
// TESTSETUP

[source,console]
----
DELETE /_data_stream/*

DELETE /_index_template/foo_data_stream
----
// TEARDOWN
////

[source,console]
----
GET /_resolve/index/my-index-*
----
// TEST[skip:unable to ignore deprecation warning]

[[resolve-index-api-request]]
==== {api-request-title}

`GET /_resolve/index/<name>`

[[resolve-index-api-prereqs]]
==== {api-prereq-title}

* If the {es} {security-features} are enabled, you must have the
`view_index_metadata` or `manage` <<privileges-list-indices,index privilege>>
for the target data stream, index, or index alias.

[[resolve-index-api-path-params]]
==== {api-path-parms-title}

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

[[resolve-index-api-query-params]]
==== {api-query-parms-title}

include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.

include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
+
Defaults to `false`.

include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
+
Defaults to `true`.

`ignore_throttled`::
(Optional, Boolean) If `true`, concrete, expanded or aliased indices are
ignored when frozen. Defaults to `false`.
+
deprecated:[7.16.0]

[[resolve-index-api-example]]
==== {api-examples-title}

[source,console]
----
GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all
----
// TEST[continued]
// TEST[s/remoteCluster1:/remotecluster-/]

The API returns the following response:

[source,console-result]
----
{
  "indices": [                                 <1>
    {
      "name": "foo_closed",
      "attributes": [
        "closed"                               <2>
      ]
    },
    {
      "name": "freeze-index",
      "aliases": [
        "f-alias"
      ],
      "attributes": [
        "open"
      ]
    },
    {
      "name": "remoteCluster1:bar-01",
      "attributes": [
        "open"
      ]
    }
  ],
  "aliases": [                                 <3>
    {
      "name": "f-alias",
      "indices": [
        "freeze-index",
        "my-index-000001"
      ]
    }
  ],
  "data_streams": [                            <4>
    {
      "name": "foo",
      "backing_indices": [
        ".ds-foo-2099.03.07-000001"
      ],
      "timestamp_field": "@timestamp"
    }
  ]
}
----
// TESTRESPONSE[s/remoteCluster1:/remotecluster-/]
// TESTRESPONSE[s/.ds-foo-2099.03.07-000001/$body.data_streams.0.backing_indices.0/]

<1> All indices matching the supplied names or expressions
<2> Possible index attributes are `open`, `closed`, `hidden`, `system`, and `frozen`
<3> All aliases matching the supplied names or expressions
<4> All data streams matching the supplied names or expressions
