OpenSearch/docs/reference/indices/alias-exists.asciidoc

68 lines
1.4 KiB
Plaintext

[[indices-alias-exists]]
=== Index alias exists API
++++
<titleabbrev>Index alias exists</titleabbrev>
++++
Checks if an index alias exists.
include::{es-repo-dir}/glossary.asciidoc[tag=index-alias-desc]
[source,console]
----
HEAD /_alias/alias1
----
// TEST[setup:twitter]
// TEST[s/^/PUT twitter\/_alias\/alias1\n/]
[[alias-exists-api-request]]
==== {api-request-title}
`HEAD /_alias/<alias>`
`HEAD /<index>/_alias/<alias>`
[[alias-exists-api-path-params]]
==== {api-path-parms-title}
`<alias>`::
(Required, string)
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-alias]
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
[[alias-exists-api-query-params]]
==== {api-query-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `all`.
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
[[alias-exists-api-response-codes]]
==== {api-response-codes-title}
`200`::
Indicates all specified index aliases exist.
`404`::
Indicates one or more specified index aliases **do not** exist.
[[alias-exists-api-example]]
==== {api-examples-title}
[source,console]
----
HEAD /_alias/2030
HEAD /_alias/20*
HEAD /logs_20302801/_alias/*
----
// TEST[s/^/PUT logs_20302801\nPUT logs_20302801\/_alias\/2030\n/]