NOTE: You are looking at documentation for an older release. 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(RequestOptions.DEFAULT);
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 |