---
type: api
title: Get the rollup index capabilities
description: Get the rollup capabilities of all jobs inside of a rollup index.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-rollup-get-rollup-index-caps
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-rollup-get-rollup-index-caps
products:
  - Elasticsearch
---

# Get the rollup index capabilities

deprecated

Availability: Preview since 6.4

## Paths

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

#### Path parameters

- `index` (union string | string[]) — required
  Data stream or index to check for rollup capabilities.
Wildcard (`*`) expressions are supported.

## Description

Get the rollup capabilities of all jobs inside of a rollup index.
A single rollup index may store the data for multiple rollup jobs and may have a variety of capabilities depending on those jobs. This API enables you to determine:

* What jobs are stored in an index (or indices specified via a pattern)?
* What target indices were rolled up, what fields were used in those rollups, and what aggregations can be performed on each job?

## Required authorization

- Index privileges: `read`

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

## Response

`application/json`

- `<string>` (object)
  - `rollup_jobs` (object[])
    - `fields` (map string to object)
    - `index_pattern` (string)
    - `job_id` (string)
    - `rollup_index` (string)
## Code examples

#### Console

```console
GET /sensor_rollup/_rollup/data
```

#### JavaScript

```javascript
const response = await client.rollup.getRollupIndexCaps({
  index: "sensor_rollup",
});
```

#### Python

```python
resp = client.rollup.get_rollup_index_caps(
    index="sensor_rollup",
)
```

#### curl

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

#### Java

```java
client.rollup().getRollupIndexCaps(g -> g
    .index("sensor_rollup")
);
```

#### C#

```c#
var response = await client.Rollup.GetRollupIndexCapsAsync(index: new[] { "sensor_rollup" });
```

#### PHP

```php
$resp = $client->rollup()->getRollupIndexCaps([
    "index" => "sensor_rollup",
]);
```

#### Ruby

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

## Response examples

#### Get rollup index capabilities response example1

A successful response from `GET /sensor_rollup/_rollup/data`. 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" : {
    "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"
            }
          ]
        }
      }
    ]
  }
}
```

