get_settings.asciidoc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --
  2. :api: get-settings
  3. :request: ClusterGetSettingsRequest
  4. :response: ClusterGetSettingsResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Cluster Get Settings API
  8. The Cluster Get Settings API allows to get the cluster wide settings.
  9. [id="{upid}-{api}-request"]
  10. ==== Cluster Get Settings Request
  11. A +{request}+:
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. --------------------------------------------------
  16. ==== Optional arguments
  17. The following arguments can optionally be provided:
  18. ["source","java",subs="attributes,callouts,macros"]
  19. --------------------------------------------------
  20. include-tagged::{doc-tests-file}[{api}-request-includeDefaults]
  21. --------------------------------------------------
  22. <1> By default only those settings that were explicitly set are returned. Setting this to true also returns
  23. the default settings.
  24. ["source","java",subs="attributes,callouts,macros"]
  25. --------------------------------------------------
  26. include-tagged::{doc-tests-file}[{api}-request-local]
  27. --------------------------------------------------
  28. <1> By default the request goes to the master of the cluster to get the latest results. If local is specified it gets
  29. the results from whichever node the request goes to.
  30. ["source","java",subs="attributes,callouts,macros"]
  31. --------------------------------------------------
  32. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  33. --------------------------------------------------
  34. <1> Timeout to connect to the master node as a `TimeValue`
  35. <2> Timeout to connect to the master node as a `String`
  36. include::../execution.asciidoc[]
  37. [id="{upid}-{api}-response"]
  38. ==== Cluster Get Settings Response
  39. The returned +{response}+ allows to retrieve information about the
  40. executed operation as follows:
  41. ["source","java",subs="attributes,callouts,macros"]
  42. --------------------------------------------------
  43. include-tagged::{doc-tests-file}[{api}-response]
  44. --------------------------------------------------
  45. <1> Get the persistent settings.
  46. <2> Get the transient settings.
  47. <3> Get the default settings (returns empty settings if `includeDefaults` was not set to `true`).
  48. <4> Get the value as a `String` for a particular setting. The order of searching is first in `persistentSettings` then in
  49. `transientSettings` and finally, if not found in either, in `defaultSettings`.