mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
* 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
95 lines
2.8 KiB
Text
95 lines
2.8 KiB
Text
[[indices-get-settings]]
|
|
=== Get index settings API
|
|
++++
|
|
<titleabbrev>Get index settings</titleabbrev>
|
|
++++
|
|
|
|
Returns setting information for one or more indices. For data streams, the API
|
|
returns setting information for the stream's backing indices.
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /my-index-000001/_settings
|
|
--------------------------------------------------
|
|
// TEST[setup:my_index]
|
|
|
|
|
|
[[get-index-settings-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`GET /<target>/_settings`
|
|
|
|
`GET /<target>/_settings/<setting>`
|
|
|
|
[[get-index-settings-api-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* If the {es} {security-features} are enabled, you must have the
|
|
`view_index_metadata`, `monitor`, or `manage` <<privileges-list-indices,index
|
|
privilege>> for the target data stream, index, or alias.
|
|
|
|
[[get-index-settings-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<target>`::
|
|
(Optional, 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`.
|
|
|
|
`<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}
|
|
|
|
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`.
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
|
|
|
|
|
[[get-index-settings-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
===== Multiple data streams and indices
|
|
|
|
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>`.
|
|
Wildcard expressions are also supported. The following are some examples:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /my-index-000001,my-index-000002/_settings
|
|
|
|
GET /_all/_settings
|
|
|
|
GET /log_2099_*/_settings
|
|
--------------------------------------------------
|
|
// TEST[setup:my_index]
|
|
// TEST[s/^/PUT my-index-000002\nPUT log_2099_01_01\n/]
|
|
|
|
===== Filtering settings by name
|
|
|
|
The settings that are returned can be filtered with wildcard matching
|
|
as follows:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /log_2099_-*/_settings/index.number_*
|
|
--------------------------------------------------
|
|
// TEST[continued]
|