[[indices-exists]]
=== Index exists API
++++
Index exists
++++
Checks if an index exists.
[source,console]
--------------------------------------------------
HEAD /my-index-000001
--------------------------------------------------
// TEST[setup:my_index]
[[indices-exists-api-request]]
==== {api-request-title}
`HEAD /`
[[indices-exists-api-path-params]]
==== {api-path-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
+
IMPORTANT: This parameter does not distinguish between an index name and <>,
i.e. status code `200` is also returned if an alias exists with that name.
[[indices-exists-api-query-params]]
==== {api-query-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
+
Defaults to `true`.
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
[[indices-exists-api-response-codes]]
==== {api-response-codes-title}
`200`::
Indicates all specified indices or index aliases exist.
`404`::
Indicates one or more specified indices or index aliases **do not** exist.