# List Rollups

`GET /rollups` · Core · Analytics & Intelligence

Returns every rollup in the project whose dataset the caller can read, with its read and subscribe endpoints. Requires the `datasets:list` permission. Callers must be members of the project (an organization role alone does not grant access); project service tokens and extension tokens cannot call it.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | The project's rollups. |
| `data.rollups` | array of object | yes | The rollups, newest first. Only rollups whose dataset the caller may read are listed. |
| `data.rollups.[]id` | string | yes | `rollup_` id. |
| `data.rollups.[]slug` | string | yes | The rollup's slug, unique in the project. Its read and subscribe paths use it. |
| `data.rollups.[]subjectField` | object | yes | The source event field that names the data subject. Null when the rollup declares `nonPersonal` instead (or, for a rollup made before declarations were required, neither). |
| _one of_ | | |  |
| _or_ | | |  |
| `data.rollups.[]nonPersonal` | boolean | yes | True when the rollup's creator declared that its source carries no personal data. |
| `data.rollups.[]datasetSlug` | string | yes | The dataset the rollup writes to. |
| `data.rollups.[]source` | string | yes | The source the rollup folds: a Pulse Stream's slug, or a telemetry signal name. Falls back to the stored stream id when the stream has been deleted. |
| `data.rollups.[]dimensions` | array of string | yes | The fields each cell is grouped by, in declared order (at most 16). |
| `data.rollups.[]measures` | array of object | yes | The declared measures, in order (at most 64). |
| `data.rollups.[]measures.[]name` | string | yes | The measure's name: its key in each cell's `measures`. |
| `data.rollups.[]measures.[]agg` | string | yes | `count`, `last`, `sum`, `avg`, `min`, `max`, `count_distinct`, `p50`, `p95` or `p99`. |
| `data.rollups.[]measures.[]column` | string | no | The source field aggregated. Absent for `count`. |
| `data.rollups.[]windowSeconds` | integer | yes | The width of each cell's time window, in seconds. |
| `data.rollups.[]enabled` | boolean | yes | Whether the rollup is set to fold. |
| `data.rollups.[]reattestIntervalDays` | integer | yes | How many days each attestation lasts: 7, 30, 90 or 365. |
| `data.rollups.[]attestedAt` | string (date-time) | yes | When a person last confirmed the rollup (created or re-attested it). |
| `data.rollups.[]expiresAt` | string (date-time) | yes | `attestedAt` plus `reattestIntervalDays`. After it the rollup stops folding until it is re-attested. |
| `data.rollups.[]attestationStatus` | enum ("active", "expiring_soon", "expired") | yes | `expiring_soon` within 14 days of `expiresAt`. |
| `data.rollups.[]cursorSequence` | object | yes | The source sequence the last committed fold reached, as a decimal string. Null until a fold has written a cell. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.rollups.[]lastFoldAt` | object | yes | When the last fold ran. Null if it has never run. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.rollups.[]lastFoldStatus` | object | yes | How the last fold ended: `ok` for a clean fold, otherwise why it did not fold (for example `attestation_expired`, `stale_principal_denied`, `dataset_gone`, `write_error` or `failed`). Null if it has never run. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.rollups.[]createdAt` | string (date-time) | yes | When the rollup was created. |
| `data.rollups.[]endpoints` | object | yes | Absolute paths: `/@<project>/rollups/<slug>/read` and `/subscribe`. |
| `data.rollups.[]endpoints.read` | string | yes | The path to read the rollup's cells. |
| `data.rollups.[]endpoints.subscribe` | string | yes | The path to subscribe to the rollup's cells as they change. |
| `meta` | object | yes | Request metadata: cost, timing and correlation ids. |
| `meta.cost` | object | yes | Metered usage for this request; empty when nothing was metered. |
| `meta.timing` | object | yes |  |
| `meta.timing.gatewayMs` | number | yes |  |
| `meta.timing.totalMs` | number | yes |  |
| `meta.context` | object | yes |  |
| `meta.context.requestId` | string | yes |  |
| `meta.context.traceId` | string | yes |  |
| `meta.context.projectId` | string | no |  |
| `meta.warnings` | array of object | no |  |
| `meta.warnings.[]code` | string | yes |  |
| `meta.warnings.[]message` | string | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_UNAUTHENTICATED` | The caller is not signed in. |
| 403 | `K9O_ACCESS_DENIED` | The caller is not a member of this project; an organization role alone does not grant access. |
| 404 | `K9O_NOT_FOUND` | The project was not found for this caller (project service tokens and extension tokens cannot call this endpoint). |
| 403 | `K9O_IAM_POLICY_DENIED` | The caller's role or IAM policy does not grant datasets:list. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/rollups' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/rollups', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o rollups list
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.rollups.list()
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.rollups.list()
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Rollups.List(ctx)
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.rollups.list().await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.rollups().list()
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Rollups.ListAsync()
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.rollups.list()
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->rollups->list()
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/list-rollups
