elasticsearch/docs/reference/indices/get-alias.asciidoc
James Rodewig cfae69717a
[DOCS] Update anchor and add redirect for aliases (#77349)
PRs #73062 and #73043 repurposed the `alias` anchor for a new guide for index
and data stream aliases. Previously, this anchor was used for our field alias
documentation.

Repurposing the anchor has caused continuity errors for users selecting
different versions of the ES docs. It could also cause confusion for users with
a `/current/` link to the `alias` page.

This updates the anchor for the alias guide and adds a redirect page to
disambiguate the `alias` anchor.

It also fixes a bread crumb issue for redirects following the 'Modifying your
Data' redirect page.

Closes #77034.
2021-09-07 09:42:42 -04:00

62 lines
1.7 KiB
Text

[[indices-get-alias]]
=== Get alias API
++++
<titleabbrev>Get alias</titleabbrev>
++++
Retrieves information for one or more <<aliases,aliases>>.
[source,console]
----
GET my-data-stream/_alias/my-alias
----
// TEST[setup:my_data_stream]
// TEST[s/^/PUT my-data-stream\/_alias\/my-alias\n/]
// TEST[teardown:data_stream_cleanup]
[[get-alias-api-request]]
==== {api-request-title}
`GET _alias/<alias>`
`GET _alias`
`GET <target>/_alias/<alias>`
[[get-alias-api-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 `view_index_metadata`
or `manage` index privilege for the target.
[[get-alias-api-path-params]]
==== {api-path-parms-title}
`<alias>`::
(Optional, string) Comma-separated list of aliases to retrieve. Supports
wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or
`_all`.
`<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`.
[[get-alias-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 `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-repo-dir}/rest-api/common-parms.asciidoc[tag=local]