- Java REST Client (deprecated): other versions:
- Overview
- Java Low Level REST Client
- Java High Level REST Client
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Info API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Info API
editExecution
editCluster information can be retrieved using the info()
method:
MainResponse response = client.info();
Response
editThe returned MainResponse
provides various kinds of information about the cluster:
ClusterName clusterName = response.getClusterName(); String clusterUuid = response.getClusterUuid(); String nodeName = response.getNodeName(); Version version = response.getVersion(); Build build = response.getBuild();
Retrieve the name of the cluster as a |
|
Retrieve the unique identifier of the cluster |
|
Retrieve the name of the node the request has been executed on |
|
Retrieve the version of the node the request has been executed on |
|
Retrieve the build information of the node the request has been executed on |
Was this helpful?
Thank you for your feedback.