elasticsearch/docs/reference/indices/get-index.asciidoc
Liam Thompson 33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* 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
2024-04-17 14:37:07 +02:00

64 lines
1.8 KiB
Text

[[indices-get-index]]
=== Get index API
++++
<titleabbrev>Get index</titleabbrev>
++++
Returns information about one or more indices. For data streams, the API
returns information about the stream's backing indices.
[source,console]
--------------------------------------------------
GET /my-index-000001
--------------------------------------------------
// TEST[setup:my_index]
[[get-index-api-request]]
==== {api-request-title}
`GET /<target>`
[[get-index-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 target data stream, index, or alias.
[[get-index-api-path-params]]
==== {api-path-parms-title}
`<target>`::
(Required, string) Comma-separated list of data streams, indices, and aliases
used to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
[[get-index-api-query-params]]
==== {api-query-parms-title}
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
+
Defaults to `true`.
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.
`features`::
(Optional, string)
Return information about specific index features. Supports comma-
separated values. Valid values are `aliases`, `mappings`, and `settings`.
Defaults to `aliases,mappings,settings`.
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
`ignore_unavailable`::
(Optional, Boolean)
If `false`, requests that target a missing index return an error. Defaults to
`false`.
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]