get-index.asciidoc 1.7 KB

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