---
type: api
title: Get feature usage information
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-nodes-usage
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-nodes-usage
products:
  - Elasticsearch
---

# Get feature usage information


Availability: Generally available since 6.0

## Paths

- `GET` `/_nodes/{node_id}/usage/{metric}`
- `GET` `/_nodes/{node_id}/usage`
- `GET` `/_nodes/usage/{metric}`
- `GET` `/_nodes/usage`

#### Path parameters

- `node_id` (union string | string[]) — optional, leave it out to use `/_nodes/usage`
  A comma-separated list of node IDs or names to limit the returned information.
Use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
- `metric` (union string | string[]) — optional, leave it out to use `/_nodes/usage`
  Limits the information returned to the specific metrics.
A comma-separated list of the following options: `_all`, `rest_actions`.

## Required authorization

- Cluster privileges: `monitor`, `manage`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Query string parameters

- `timeout` (string · default: 30s) — optional
  Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.

## Response

`application/json`

- `_nodes` (object)
  Contains statistics about the number of nodes selected by the request’s node filters.
  - `failures` (object[])
    - `type` (string)
      The type of error
    - `reason` (union string) — nullable
      A human-readable explanation of the error, in English.
      One of: `string`
    - `stack_trace` (string)
      The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.
    - `caused_by` (object) — recursive
      Same fields as `failures` in `_nodes`
    - `root_cause` (object[]) — recursive
      Same fields as `failures` in `_nodes`
    - `suppressed` (object[]) — recursive
      Same fields as `failures` in `_nodes`
  - `total` (number)
    Total number of nodes selected by the request.
  - `successful` (number)
    Number of nodes that responded successfully to the request.
  - `failed` (number)
    Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.
- `cluster_name` (string)
- `nodes` (map string to object)
  Map values (object)
  - `rest_actions` (map string to number)
    The total number of times each REST endpoint has been called on this node since the last restart.
 Note that the REST endpoint names are not considered stable.
  - `since` (number)
    The timestamp for when the collection of these statistics started.
  - `timestamp` (number)
    The timestamp for when these statistics were collected.
  - `aggregations` (map string to object)
    The total number of times search aggregations have been called on this node since the last restart.
## Code examples

#### Console

```console
GET _nodes/usage
```

#### JavaScript

```javascript
const response = await client.nodes.usage();
```

#### Python

```python
resp = client.nodes.usage()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_nodes/usage" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.nodes().usage(u -> u);
```

#### C#

```c#
var response = await client.Nodes.UsageAsync();
```

#### PHP

```php
$resp = $client->nodes()->usage();
```

#### Ruby

```ruby
response = client.nodes.usage
```

