---
type: api
title: Get the rollup job capabilities
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-rollup-get-rollup-caps
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-rollup-get-rollup-caps
products:
  - Elasticsearch
---

# Get the rollup job capabilities


deprecated

Availability: 6.3+

## Paths

- `GET` `/_rollup/data/{id}`
- `GET` `/_rollup/data`

- [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

- `id` (string Id) — optional, leave it out to use `/_rollup/data`
  Index, indices or index-pattern to return rollup capabilities for.
`_all` may be used to fetch rollup capabilities from all jobs.

## Description

Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.

This API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.
Furthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.
This API enables you to inspect an index and determine:

1. Does this index have associated rollup data somewhere in the cluster?
2. If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?

## Required authorization

* Cluster privileges: `monitor_rollup`

## Response

`application/json`

Type: `map string to RollupCapabilities`

## Code Examples

#### Console

```console
GET _rollup/data/sensor-*
```

#### JavaScript

```javascript
const response = await client.rollup.getRollupCaps({
  id: "sensor-*",
});
```

#### Python

```python
resp = client.rollup.get_rollup_caps(
    id="sensor-*",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_rollup/data/sensor-*" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.rollup().getRollupCaps(g -> g
    .id("sensor-*")
);
```

#### C#

```c#
var response = await client.Rollup
    .GetRollupCapsAsync(d1 => d1
        .Id("sensor-*")
    );
```

#### PHP

```php
$resp = $client->rollup()->getRollupCaps([
    "id" => "sensor-*",
]);
```

#### Ruby

```ruby
response = client.perform_request(
  "GET",
  "/_rollup/data/sensor-*",
  {},
)
```

## Response Examples

#### Get rollup capabilities response example1

A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.

```json
{
  "sensor-*" : {
    "rollup_jobs" : [
      {
        "job_id" : "sensor",
        "rollup_index" : "sensor_rollup",
        "index_pattern" : "sensor-*",
        "fields" : {
          "node" : [
            {
              "agg" : "terms"
            }
          ],
          "temperature" : [
            {
              "agg" : "min"
            },
            {
              "agg" : "max"
            },
            {
              "agg" : "sum"
            }
          ],
          "timestamp" : [
            {
              "agg" : "date_histogram",
              "time_zone" : "UTC",
              "fixed_interval" : "1h",
              "delay": "7d"
            }
          ],
          "voltage" : [
            {
              "agg" : "avg"
            }
          ]
        }
      }
    ]
  }
}
```

