1
0

get-settings.asciidoc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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::{docdir}/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::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  27. include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  28. +
  29. Defaults to `all`.
  30. include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  31. include::{docdir}/rest-api/common-parms.asciidoc[tag=include-defaults]
  32. include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  33. include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
  34. include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  35. [[get-index-settings-api-example]]
  36. ==== {api-examples-title}
  37. ===== Multiple indices
  38. The get settings API can be used to get settings for more than one index with a
  39. single call. To get settings for all indices you can use `_all` for `<index>`.
  40. Wildcard expressions are also supported. The following are some examples:
  41. [source,console]
  42. --------------------------------------------------
  43. GET /twitter,kimchy/_settings
  44. GET /_all/_settings
  45. GET /log_2013_*/_settings
  46. --------------------------------------------------
  47. // TEST[setup:twitter]
  48. // TEST[s/^/PUT kimchy\nPUT log_2013_01_01\n/]
  49. ===== Filtering settings by name
  50. The settings that are returned can be filtered with wildcard matching
  51. as follows:
  52. [source,console]
  53. --------------------------------------------------
  54. GET /log_2013_-*/_settings/index.number_*
  55. --------------------------------------------------
  56. // TEST[continued]