main.asciidoc 1.0 KB

123456789101112131415161718192021222324252627
  1. [[java-rest-high-main]]
  2. === Info API
  3. [[java-rest-high-main-request]]
  4. ==== Execution
  5. Cluster information can be retrieved using the `info()` method:
  6. ["source","java",subs="attributes,callouts,macros"]
  7. --------------------------------------------------
  8. include-tagged::{doc-tests}/MiscellaneousDocumentationIT.java[main-execute]
  9. --------------------------------------------------
  10. [[java-rest-high-main-response]]
  11. ==== Response
  12. The returned `MainResponse` provides various kinds of information about the cluster:
  13. ["source","java",subs="attributes,callouts,macros"]
  14. --------------------------------------------------
  15. include-tagged::{doc-tests}/MiscellaneousDocumentationIT.java[main-response]
  16. --------------------------------------------------
  17. <1> Retrieve the name of the cluster as a `ClusterName`
  18. <2> Retrieve the unique identifier of the cluster
  19. <3> Retrieve the name of the node the request has been executed on
  20. <4> Retrieve the version of the node the request has been executed on
  21. <5> Retrieve the build information of the node the request has been executed on