2019-08-28 08:58:09 -04:00
|
|
|
[[indices-alias-exists]]
|
|
|
|
=== Index alias exists API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Index alias exists</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Checks if an index alias exists.
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/glossary.asciidoc[tag=index-alias-desc]
|
2019-08-28 08:58:09 -04:00
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2019-08-28 08:58:09 -04:00
|
|
|
----
|
|
|
|
HEAD /_alias/alias1
|
|
|
|
----
|
2020-07-31 09:51:47 -04:00
|
|
|
// TEST[setup:my_index]
|
|
|
|
// TEST[s/^/PUT my-index-000001\/_alias\/alias1\n/]
|
2019-08-28 08:58:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[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)
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-alias]
|
2019-08-28 08:58:09 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
|
2019-08-28 08:58:09 -04:00
|
|
|
|
|
|
|
[[alias-exists-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
2019-08-28 08:58:09 -04:00
|
|
|
+
|
|
|
|
Defaults to `all`.
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
2019-08-28 08:58:09 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
|
2019-08-28 08:58:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[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}
|
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2019-08-28 08:58:09 -04:00
|
|
|
----
|
|
|
|
HEAD /_alias/2030
|
|
|
|
HEAD /_alias/20*
|
|
|
|
HEAD /logs_20302801/_alias/*
|
|
|
|
----
|
|
|
|
// TEST[s/^/PUT logs_20302801\nPUT logs_20302801\/_alias\/2030\n/]
|