get-index.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 alias.
  21. [[get-index-api-path-params]]
  22. ==== {api-path-parms-title}
  23. `<target>`::
  24. (Required, string) Comma-separated list of data streams, indices, and aliases
  25. used to limit the request. Supports wildcards (`*`). To target all data streams
  26. and indices, omit this parameter or use `*` or `_all`.
  27. [[get-index-api-query-params]]
  28. ==== {api-query-parms-title}
  29. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  30. +
  31. Defaults to `true`.
  32. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  33. +
  34. Defaults to `open`.
  35. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  36. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
  37. `ignore_unavailable`::
  38. (Optional, Boolean)
  39. If `false`, requests that target a missing index return an error. Defaults to
  40. `false`.
  41. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
  42. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]