get-settings.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. [[indices-get-settings]]
  2. === Get index settings API
  3. ++++
  4. <titleabbrev>Get index settings</titleabbrev>
  5. ++++
  6. Returns setting information for an index.
  7. [source,console]
  8. --------------------------------------------------
  9. GET /twitter/_settings
  10. --------------------------------------------------
  11. // TEST[setup:twitter]
  12. [[get-index-settings-api-request]]
  13. ==== {api-request-title}
  14. `GET /<index>/_settings`
  15. `GET /<index>/_settings/<setting>`
  16. [[get-index-settings-api-path-params]]
  17. ==== {api-path-parms-title}
  18. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
  19. +
  20. Use a value of `_all` to retrieve information for all indices in the cluster.
  21. `<setting>`::
  22. (Optional, string) Comma-separated list or wildcard expression of setting names
  23. used to limit the request.
  24. [[get-index-settings-api-query-params]]
  25. ==== {api-query-parms-title}
  26. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  27. +
  28. Defaults to `true`.
  29. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  30. +
  31. Defaults to `all`.
  32. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  33. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
  34. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  35. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
  36. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  37. [[get-index-settings-api-example]]
  38. ==== {api-examples-title}
  39. ===== Multiple indices
  40. The get settings API can be used to get settings for more than one index with a
  41. single call. To get settings for all indices you can use `_all` for `<index>`.
  42. Wildcard expressions are also supported. The following are some examples:
  43. [source,console]
  44. --------------------------------------------------
  45. GET /twitter,kimchy/_settings
  46. GET /_all/_settings
  47. GET /log_2013_*/_settings
  48. --------------------------------------------------
  49. // TEST[setup:twitter]
  50. // TEST[s/^/PUT kimchy\nPUT log_2013_01_01\n/]
  51. ===== Filtering settings by name
  52. The settings that are returned can be filtered with wildcard matching
  53. as follows:
  54. [source,console]
  55. --------------------------------------------------
  56. GET /log_2013_-*/_settings/index.number_*
  57. --------------------------------------------------
  58. // TEST[continued]