Query parameters
-
A comma-separated list of columns names to display. It supports simple wildcards.
Supported values include:
node
: The node name.id
(orid
,nodeId
): The unique node ID.pid
(orp
): The process ID.host
(orh
): The host name.ip
(ori
): The IP address.port
(orpo
): The bound transport port.attr
(orattr.name
): The attribute description.value
(orattr.value
): The attribute value.
Values are
node
,id
,nodeId
,pid
,p
,host
,h
,ip
,i
,port
,po
,attr
,attr.name
,value
, orattr.value
. -
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/nodeattrs
Console
GET /_cat/nodeattrs?v=true&format=json
resp = client.cat.nodeattrs(
v=True,
format="json",
)
const response = await client.cat.nodeattrs({
v: "true",
format: "json",
});
response = client.cat.nodeattrs(
v: "true",
format: "json"
)
$resp = $client->cat()->nodeattrs([
"v" => "true",
"format" => "json",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/nodeattrs?v=true&format=json"
Response examples (200)
Default columns
A successful response from `GET /_cat/nodeattrs?v=true&format=json`. The `node`, `host`, and `ip` columns provide basic information about each node. The `attr` and `value` columns return custom node attributes, one per line.
[
{
"node": "node-0",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"attr": "testattr",
"value": "test"
}
]
A successful response from `GET /_cat/nodeattrs?v=true&h=name,pid,attr,value`. It returns the `name`, `pid`, `attr`, and `value` columns.
[
{
"name": "node-0",
"pid": "19566",
"attr": "testattr",
"value": "test"
}
]