Link Search Menu Expand Document Documentation Menu

You're viewing version 2.3 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

Get settings

Introduced 1.0

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

Example

GET /sample-index1/_settings

Path and HTTP methods

GET /_settings
GET /<target-index>/_settings
GET /<target-index>/_settings/<setting>

URL parameters

All update settings parameters are optional.

Parameter Data Type Description
<target-index> String The 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> String Filter to return specific settings.
allow_no_indices Boolean Whether to ignore wildcards that don’t match any indexes. Default is true.
expand_wildcards String Expands 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_settings Boolean Whether 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_defaults String Whether to include default settings, including settings used within OpenSearch’s plugins, in the response. Default is false.
ignore_unavailable Boolean If true, OpenSearch does not include missing or closed indexes in the response.
local Boolean Whether to return information from the local node only instead of the master node. Default is false.
master_timeout Time How long to wait for a connection to the master node. Default is 30s.

Response

{
  "sample-index1": {
    "settings": {
      "index": {
        "creation_date": "1622672553417",
        "number_of_shards": "1",
        "number_of_replicas": "1",
        "uuid": "GMEA0_TkSaamrnJSzNLzwg",
        "version": {
          "created": "135217827",
          "upgraded": "135238227"
        },
        "provided_name": "sample-index1"
      }
    }
  }
}
350 characters left

Have a question? .

Want to contribute? or .