2013-08-28 19:24:34 -04:00
|
|
|
[[indices-get-settings]]
|
2019-08-26 08:57:00 -04:00
|
|
|
=== Get index settings API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get index settings</titleabbrev>
|
|
|
|
++++
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2020-07-13 09:05:03 -04:00
|
|
|
Returns setting information for one or more indices. For data streams, the API
|
|
|
|
returns setting information for the stream's backing indices.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /twitter/_settings
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// TEST[setup:twitter]
|
2014-01-05 17:06:02 -05:00
|
|
|
|
|
|
|
|
2019-08-26 08:57:00 -04:00
|
|
|
[[get-index-settings-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
2020-07-13 09:05:03 -04:00
|
|
|
`GET /<target>/_settings`
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-07-13 09:05:03 -04:00
|
|
|
`GET /<target>/_settings/<setting>`
|
2019-08-26 08:57:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[get-index-settings-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2020-07-13 09:05:03 -04:00
|
|
|
`<target>`::
|
|
|
|
(Optional, string)
|
|
|
|
Comma-separated list of data streams, indices, and index aliases used to limit
|
|
|
|
the request. Wildcard expressions (`*`) are supported.
|
2019-08-26 08:57:00 -04:00
|
|
|
+
|
2020-07-13 09:05:03 -04:00
|
|
|
To target all data streams and indices in a cluster, omit this parameter or use
|
|
|
|
`_all` or `*`.
|
2019-08-26 08:57:00 -04:00
|
|
|
|
|
|
|
`<setting>`::
|
|
|
|
(Optional, string) Comma-separated list or wildcard expression of setting names
|
|
|
|
used to limit the request.
|
|
|
|
|
|
|
|
|
|
|
|
[[get-index-settings-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
|
2020-02-24 05:57:32 -05:00
|
|
|
+
|
|
|
|
Defaults to `true`.
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
2019-08-26 08:57:00 -04:00
|
|
|
+
|
|
|
|
Defaults to `all`.
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
2019-08-26 08:57:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[get-index-settings-api-example]]
|
|
|
|
==== {api-examples-title}
|
|
|
|
|
2020-07-13 09:05:03 -04:00
|
|
|
===== Multiple data streams and indices
|
2019-08-26 08:57:00 -04:00
|
|
|
|
2020-07-13 09:05:03 -04:00
|
|
|
The get settings API can be used to get settings for more than one data stream or index with a
|
|
|
|
single call. To get settings for all indices in a cluster, you can use `_all` or `*` for `<target>`.
|
2014-01-05 17:06:02 -05:00
|
|
|
Wildcard expressions are also supported. The following are some examples:
|
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2014-01-05 17:06:02 -05:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /twitter,kimchy/_settings
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /_all/_settings
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /log_2013_*/_settings
|
2014-01-05 17:06:02 -05:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// TEST[setup:twitter]
|
|
|
|
// TEST[s/^/PUT kimchy\nPUT log_2013_01_01\n/]
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2019-08-26 08:57:00 -04:00
|
|
|
===== Filtering settings by name
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2015-10-02 10:43:53 -04:00
|
|
|
The settings that are returned can be filtered with wildcard matching
|
|
|
|
as follows:
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2014-01-05 17:06:02 -05:00
|
|
|
--------------------------------------------------
|
2017-05-01 13:56:39 -04:00
|
|
|
GET /log_2013_-*/_settings/index.number_*
|
2014-01-05 17:06:02 -05:00
|
|
|
--------------------------------------------------
|
2020-02-24 05:57:32 -05:00
|
|
|
// TEST[continued]
|