Get settings

Introduced 1.0

The get settings API operation returns all the settings in your index.

Example

  1. GET /sample-index1/_settings

Path and HTTP methods

  1. GET /_settings
  2. GET /<target-index>/_settings
  3. GET /<target-index>/_settings/<setting>

URL parameters

All update settings parameters are optional.

ParameterData typeDescription
<target-index>StringThe index to get settings from. Can be a comma-separated list to get settings from multiple indexes, or use _all to return settings from all indexes within the cluster.
<setting>StringFilter to return specific settings.
allow_no_indicesBooleanWhether to ignore wildcards that don’t match any indexes. Default is true.
expand_wildcardsStringExpands wildcard expressions to different indexes. Combine multiple values with commas. Available values are all (match all indexes), open (match open indexes), closed (match closed indexes), hidden (match hidden indexes), and none (do not accept wildcard expressions), which must be used with open, closed, or both. Default is open.
flat_settingsBooleanWhether to return settings in the flat form, which can improve readability, especially for heavily nested settings. For example, the flat form of “index”: { “creation_date”: “123456789” } is “index.creation_date”: “123456789”.
include_defaultsStringWhether to include default settings, including settings used within OpenSearch’s plugins, in the response. Default is false.
ignore_unavailableBooleanIf true, OpenSearch does not include missing or closed indexes in the response.
localBooleanWhether to return information from the local node only instead of the master node. Default is false.
master_timeoutTimeHow long to wait for a connection to the master node. Default is 30s.

Response

  1. {
  2. "sample-index1": {
  3. "settings": {
  4. "index": {
  5. "creation_date": "1622672553417",
  6. "number_of_shards": "1",
  7. "number_of_replicas": "1",
  8. "uuid": "GMEA0_TkSaamrnJSzNLzwg",
  9. "version": {
  10. "created": "135217827",
  11. "upgraded": "135238227"
  12. },
  13. "provided_name": "sample-index1"
  14. }
  15. }
  16. }
  17. }