---
type: api
title: Get node attribute information
description: Get information about custom node attributes.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-cat-nodeattrs
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-cat-nodeattrs
products:
  - Elasticsearch
---

# Get node attribute information

Availability:

## Paths

- `GET` `/_cat/nodeattrs`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

## Description

Get information about custom node attributes.
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 String Parameters

- `h` (union Names)
  List of columns to appear in the response. Supports simple wildcards.
  One of: `Name` or `Name[]`
- `s` (union Names)
  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.
  One of: `Name` or `Name[]`
- `local` (boolean · default: false)
  If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` 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.
- `master_timeout` (string Duration · default: 30s)
  Period to wait for a connection to the master node.

## Response

`application/json`

Type: `[] NodeAttributesRecord`

- `node` (string)
  The node name.
- `id` (string)
  The unique node identifier.
- `pid` (string)
  The process identifier.
- `host` (string)
  The host name.
- `ip` (string)
  The IP address.
- `port` (string)
  The bound transport port.
- `attr` (string)
  The attribute name.
- `value` (string)
  The attribute value.
## Code Examples

#### Console

```console
GET /_cat/nodeattrs?v=true&format=json
```

#### JavaScript

```javascript
const response = await client.cat.nodeattrs({
  v: "true",
  format: "json",
});
```

#### Python

```python
resp = client.cat.nodeattrs(
    v=True,
    format="json",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_cat/nodeattrs?v=true&format=json" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.cat().nodeattrs();
```

#### PHP

```php
$resp = $client->cat()->nodeattrs([
    "v" => "true",
    "format" => "json",
]);
```

#### Ruby

```ruby
response = client.cat.nodeattrs(
  v: "true",
  format: "json"
)
```

## Response Examples

#### 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.

```json
[
  {
    "node": "node-0",
    "host": "127.0.0.1",
    "ip": "127.0.0.1",
    "attr": "testattr",
    "value": "test"
  }
]
```

#### Explicit columns

A successful response from `GET /_cat/nodeattrs?v=true&h=name,pid,attr,value`. It returns the `name`, `pid`, `attr`, and `value` columns.

```json
[
  {
    "name": "node-0",
    "pid": "19566",
    "attr": "testattr",
    "value": "test"
  }
]
```

