Get master node information
Generally available
Get information about the master node, including the ID, bound IP address, and name.
IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
Required authorization
- Cluster privileges:
monitor
Query parameters
-
A comma-separated list of columns names to display. It supports simple wildcards.
Supported values include:
id
: The node ID.host
(orh
): The host name of the node.ip
: The IP address of the node.node
(orn
): The node name.
Values are
id
,host
,h
,ip
,node
, orn
. -
List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting
:asc
or:desc
as a suffix to the column name. -
If
true
, the request computes the list of selected nodes from the local cluster state. Iffalse
the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node. -
Period to wait for a connection to the master node.
Values are
-1
or0
.
GET /_cat/master?v=true&format=json
resp = client.cat.master(
v=True,
format="json",
)
const response = await client.cat.master({
v: "true",
format: "json",
});
response = client.cat.master(
v: "true",
format: "json"
)
$resp = $client->cat()->master([
"v" => "true",
"format" => "json",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/master?v=true&format=json"
client.cat().master();
[
{
"id": "YzWoH_2BT-6UjVGDyPdqYg",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"node": "YzWoH_2"
}
]