get-alias.asciidoc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. [[indices-get-alias]]
  2. === Get alias API
  3. ++++
  4. <titleabbrev>Get alias</titleabbrev>
  5. ++++
  6. Retrieves information for one or more <<aliases,aliases>>.
  7. [source,console]
  8. ----
  9. GET my-data-stream/_alias/my-alias
  10. ----
  11. // TEST[setup:my_data_stream]
  12. // TEST[s/^/PUT my-data-stream\/_alias\/my-alias\n/]
  13. // TEST[teardown:data_stream_cleanup]
  14. [[get-alias-api-request]]
  15. ==== {api-request-title}
  16. `GET _alias/<alias>`
  17. `GET _alias`
  18. `GET <target>/_alias/<alias>`
  19. [[get-alias-api-api-prereqs]]
  20. ==== {api-prereq-title}
  21. * If the {es} {security-features} are enabled, you must have the
  22. `view_index_metadata` or `manage` <<privileges-list-indices,index privilege>>
  23. for the alias. If you specify a target, you must also have `view_index_metadata`
  24. or `manage` index privilege for the target.
  25. [[get-alias-api-path-params]]
  26. ==== {api-path-parms-title}
  27. `<alias>`::
  28. (Optional, string) Comma-separated list of aliases to retrieve. Supports
  29. wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or
  30. `_all`.
  31. `<target>`::
  32. (Optional, string) Comma-separated list of data streams or indices used to limit
  33. the request. Supports wildcards (`*`). To target all data streams and indices,
  34. omit this parameter or use `*` or `_all`.
  35. [[get-alias-api-query-params]]
  36. ==== {api-query-parms-title}
  37. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  38. +
  39. Defaults to `true`.
  40. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  41. +
  42. Defaults to `all`.
  43. `ignore_unavailable`::
  44. (Optional, Boolean) If `false`, requests that include a missing data stream or
  45. index in the `<target>` return an error. Defaults to `false`.
  46. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]