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

# Get feature usage information


Availability: 6.0+

## Paths

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

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

#### Path Parameters

- `node_id` (union NodeId | [] NodeId) — 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 NodesUsageMetric | [] NodesUsageMetric) — 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`, `aggregations`.

Supported values include: `_all`, `rest_actions`, `aggregations`
  Values: `_all`, `rest_actions`, `aggregations`

## Description

## Required authorization

* Cluster privileges: `monitor`,`manage`

## Query String Parameters

- `timeout` (string Duration · default: 30s)
  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` ({} NodeStatistics)
  Contains statistics about the number of nodes selected by the request’s node filters.
  - `failures` ([] ErrorCause)
    - `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` ({} ErrorCause) — recursive
      Same fields as `failures` in `_nodes`
    - `root_cause` ([] ErrorCause) — recursive
      Same fields as `failures` in `_nodes`
    - `suppressed` ([] ErrorCause) — 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 Name)
- `nodes` (map string to NodeUsage)
  Map values ({} NodeUsage)
  - `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` (EpochTimeUnitMillis)
    The timestamp for when the collection of these statistics started.
  - `timestamp` (EpochTimeUnitMillis)
    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
```

