Get index

Introduced 1.0

You can use the get index API operation to return information about an index.

Example

  1. GET /sample-index

copy

Path and HTTP methods

  1. GET /<index-name>

URL parameters

All parameters are optional.

ParameterTypeDescription
allow_no_indicesBooleanWhether to ignore wildcards that don’t match any indices. Default is true.
expand_wildcardsStringExpands wildcard expressions to different indices. Combine multiple values with commas. Available values are all (match all indices), open (match open indices), closed (match closed indices), hidden (match hidden indices), 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 as part of the response. This parameter is useful for identifying the names and current values of settings you want to update.
ignore_unavailableBooleanIf true, OpenSearch does not include missing or closed indices in the response.
localBooleanWhether to return information from only the local node instead of from 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. "aliases": {},
  4. "mappings": {},
  5. "settings": {
  6. "index": {
  7. "creation_date": "1633044652108",
  8. "number_of_shards": "2",
  9. "number_of_replicas": "1",
  10. "uuid": "XcXA0aZ5S0aiqx3i1Ce95w",
  11. "version": {
  12. "created": "135217827"
  13. },
  14. "provided_name": "sample-index1"
  15. }
  16. }
  17. }
  18. }

Response body fields

FieldDescription
aliasesAny aliases associated with the index.
mappingsAny mappings in the index.
settingsThe index’s settings
creation_dateThe Unix epoch time of when the index was created.
number_of_shardsHow many shards the index has.
number_of_replicasHow many replicas the index has.
uuidThe index’s uuid.
createdThe version of OpenSearch when the index was created.
provided_nameName of the index.