mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
* Remove `es-test-dir` book-scoped variable * Remove `plugins-examples-dir` book-scoped variable * Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables - In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed. - In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path - In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem * Replace `es-repo-dir` with `es-ref-dir` * Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
64 lines
1.6 KiB
Text
64 lines
1.6 KiB
Text
[[indices-alias-exists]]
|
|
=== Alias exists API
|
|
++++
|
|
<titleabbrev>Alias exists</titleabbrev>
|
|
++++
|
|
|
|
Checks if an <<aliases,alias>> exists.
|
|
|
|
[source,console]
|
|
----
|
|
HEAD _alias/my-alias
|
|
----
|
|
// TEST[setup:my_data_stream]
|
|
// TEST[s/^/PUT my-data-stream\/_alias\/my-alias\n/]
|
|
// TEST[teardown:data_stream_cleanup]
|
|
|
|
[[alias-exists-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`HEAD _alias/<alias>`
|
|
|
|
`HEAD <target>/_alias/<alias>`
|
|
|
|
[[alias-exists-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 alias. If you specify a target, you must also have the
|
|
`view_index_metadata` or `manage` index privilege for the target.
|
|
|
|
[[alias-exists-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<alias>`::
|
|
(Optional, string) Comma-separated list of aliases to check. Supports wildcards
|
|
(`*`).
|
|
|
|
`<target>`::
|
|
(Optional, string) Comma-separated list of data streams or indices used to limit
|
|
the request. Supports wildcards (`*`). To target all data streams and indices,
|
|
omit this parameter or use `*` or `_all`.
|
|
|
|
[[alias-exists-api-query-params]]
|
|
==== {api-query-parms-title}
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
|
+
|
|
Defaults to `all`.
|
|
|
|
`ignore_unavailable`::
|
|
(Optional, Boolean) If `false`, requests that include a missing data stream or
|
|
index in the `<target>` return an error. Defaults to `false`.
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]
|
|
|
|
[[alias-exists-api-response-codes]]
|
|
==== {api-response-codes-title}
|
|
|
|
`200`::
|
|
All specified aliases exist.
|
|
|
|
`404`::
|
|
One or more of the specified aliases don't exist.
|