get-settings.asciidoc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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,js]
  8. --------------------------------------------------
  9. GET /twitter/_settings
  10. --------------------------------------------------
  11. // CONSOLE
  12. // TEST[setup:twitter]
  13. [[get-index-settings-api-request]]
  14. ==== {api-request-title}
  15. `GET /<index>/_settings`
  16. `GET /<index>/_settings/<setting>`
  17. [[get-index-settings-api-path-params]]
  18. ==== {api-path-parms-title}
  19. include::{docdir}/rest-api/common-parms.asciidoc[tag=index]
  20. +
  21. Use a value of `_all` to retrieve information for all indices in the cluster.
  22. `<setting>`::
  23. (Optional, string) Comma-separated list or wildcard expression of setting names
  24. used to limit the request.
  25. [[get-index-settings-api-query-params]]
  26. ==== {api-query-parms-title}
  27. include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  28. include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  29. +
  30. Defaults to `all`.
  31. include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  32. include::{docdir}/rest-api/common-parms.asciidoc[tag=include-defaults]
  33. include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  34. include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
  35. include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  36. [[get-index-settings-api-example]]
  37. ==== {api-examples-title}
  38. ===== Multiple indices
  39. The get settings API can be used to get settings for more than one index with a
  40. single call. To get settings for all indices you can use `_all` for `<index>`.
  41. Wildcard expressions are also supported. The following are some examples:
  42. [source,js]
  43. --------------------------------------------------
  44. GET /twitter,kimchy/_settings
  45. GET /_all/_settings
  46. GET /log_2013_*/_settings
  47. --------------------------------------------------
  48. // CONSOLE
  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,js]
  55. --------------------------------------------------
  56. GET /log_2013_-*/_settings/index.number_*
  57. --------------------------------------------------
  58. // CONSOLE
  59. // TEST[continued]