2014-08-12 18:42:12 +08:00
|
|
|
[[indices-get-index]]
|
2019-08-23 23:14:51 +08:00
|
|
|
=== Get index API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get index</titleabbrev>
|
|
|
|
++++
|
2014-08-12 18:42:12 +08:00
|
|
|
|
2020-07-13 20:47:29 +08:00
|
|
|
Returns information about one or more indices. For data streams, the API
|
|
|
|
returns information about the stream's backing indices.
|
2014-08-12 18:42:12 +08:00
|
|
|
|
2019-09-06 22:55:16 +08:00
|
|
|
[source,console]
|
2014-08-12 18:42:12 +08:00
|
|
|
--------------------------------------------------
|
2020-07-31 21:09:54 +08:00
|
|
|
GET /my-index-000001
|
2014-08-12 18:42:12 +08:00
|
|
|
--------------------------------------------------
|
2020-07-31 21:09:54 +08:00
|
|
|
// TEST[setup:my_index]
|
2014-08-12 18:42:12 +08:00
|
|
|
|
2019-08-23 23:14:51 +08:00
|
|
|
[[get-index-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
2020-07-13 20:47:29 +08:00
|
|
|
`GET /<target>`
|
2019-08-23 23:14:51 +08:00
|
|
|
|
2021-01-28 21:53:10 +08:00
|
|
|
[[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>>
|
2021-05-28 04:00:57 +08:00
|
|
|
for the target data stream, index, or alias.
|
2019-08-23 23:14:51 +08:00
|
|
|
|
|
|
|
[[get-index-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2020-07-13 20:47:29 +08:00
|
|
|
`<target>`::
|
2021-05-28 04:00:57 +08:00
|
|
|
(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`.
|
2019-08-23 23:14:51 +08:00
|
|
|
|
|
|
|
[[get-index-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
|
2020-02-24 18:37:29 +08:00
|
|
|
+
|
|
|
|
Defaults to `true`.
|
2019-08-23 23:14:51 +08:00
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
2019-08-23 23:14:51 +08:00
|
|
|
+
|
|
|
|
Defaults to `open`.
|
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
|
2019-08-23 23:14:51 +08:00
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
|
2019-08-23 23:14:51 +08:00
|
|
|
|
2020-10-23 03:10:37 +08:00
|
|
|
`ignore_unavailable`::
|
2020-10-29 21:04:43 +08:00
|
|
|
(Optional, Boolean)
|
2020-10-23 03:10:37 +08:00
|
|
|
If `false`, requests that target a missing index return an error. Defaults to
|
|
|
|
`false`.
|
2019-08-23 23:14:51 +08:00
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
|
2019-08-23 23:14:51 +08:00
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|