Info API

edit

Execution

edit

Cluster information can be retrieved using the info() method:

MainResponse response = client.info(RequestOptions.DEFAULT);

Response

edit

The 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 ClusterName

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