Get settings

Introduced 1.0

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

Path and HTTP methods

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

Path parameters

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.

Query parameters

All get settings parameters are optional.

ParameterData typeDescription
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_defaultsBooleanWhether to include default settings, including settings used within OpenSearch 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 cluster manager node. Default is false.
cluster_manager_timeoutTimeHow long to wait for a connection to the cluster manager node. Default is 30s.

Example request

  1. GET /sample-index1/_settings

copy

Example 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. }