2018-11-27 20:40:49 -05:00
|
|
|
--
|
|
|
|
:api: get-settings
|
|
|
|
:request: GetSettingsRequest
|
|
|
|
:response: GetSettingsResponse
|
|
|
|
--
|
|
|
|
|
|
|
|
[id="{upid}-{api}"]
|
2018-05-04 11:14:28 -04:00
|
|
|
=== Get Settings API
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
[id="{upid}-{api}-request"]
|
2018-05-04 11:14:28 -04:00
|
|
|
==== Get Settings Request
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
A +{request}+ requires one or more `index` arguments:
|
2018-05-04 11:14:28 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-05-04 11:14:28 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> The index whose settings we should retrieve
|
|
|
|
|
|
|
|
==== Optional arguments
|
|
|
|
The following arguments can optionally be provided:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-names]
|
2018-05-04 11:14:28 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> One or more settings that be the only settings retrieved. If unset, all settings will be retrieved
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-include-defaults]
|
2018-05-04 11:14:28 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> If true, defaults will be returned for settings not explicitly set on the index
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-indicesOptions]
|
2018-05-04 11:14:28 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Setting `IndicesOptions` controls how unavailable indices are resolved and
|
|
|
|
how wildcard expressions are expanded
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
include::../execution.asciidoc[]
|
2018-05-04 11:14:28 -04:00
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
[id="{upid}-{api}-response"]
|
2018-05-04 11:14:28 -04:00
|
|
|
==== Get Settings Response
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
The returned +{response}+ allows to retrieve information about the
|
2018-05-04 11:14:28 -04:00
|
|
|
executed operation as follows:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-05-04 11:14:28 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> We can retrieve the setting value for a particular index directly from the response as a string
|
|
|
|
<2> We can also retrieve the Settings object for a particular index for further examination
|
|
|
|
<3> The returned Settings object provides convenience methods for non String types
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
If the `includeDefaults` flag was set to true in the +{request}+ the
|
|
|
|
behavior of +{response}+ will differ somewhat.
|
2018-05-04 11:14:28 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-defaults-response]
|
2018-05-04 11:14:28 -04:00
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
<1> Individual default setting values may be retrieved directly from the +{response}+
|
2018-05-04 11:14:28 -04:00
|
|
|
<2> We may retrieve a Settings object for an index that contains those settings with default values
|