# Re-attest Rollup

`POST /analytics/{datasetSlug}/rollups/{rollupId}/reattest` · Core · Analytics & Intelligence

Confirms the rollup's configuration is still wanted: resets its attestation to now and, optionally, sets a new `reattestIntervalDays` (7, 30, 90 or 365). A rollup whose attestation expired resumes. Returns the rollup with its new `expiresAt`.

Only a person can re-attest: a service, workload or extension token gets `403 K9O_RBAC_DENY` (`reason: human_only`); a personal access token acts as its person.

Requires the `datasets:write` permission (PROJECT_ADMIN or PROJECT_AUTHOR by default).

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 |
|---|---|---|---|
| `datasetSlug` | path | yes | The Dataset's slug. Example: `"orders"`. |
| `rollupId` | path | yes | The id of the rollup to re-attest (`rollup_...`), as create and list return it. It must belong to the dataset in the path. Example: `"rollup_9f3k2m7x1q"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `reattestIntervalDays` | object | no | A new attestation window in days: 7, 30, 90 or 365. Omit it to keep the rollup's current window. |
| _one of_ | | |  |
| _or_ | | |  |
| _or_ | | |  |
| _or_ | | |  |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | The rollup, with its new attestation. |
| `data.id` | string | yes | The rollup's id (`rollup_...`). |
| `data.slug` | string | yes | The rollup's slug, unique in the project. Its read and subscribe paths use it. |
| `data.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.nonPersonal` | boolean | yes | True when the rollup's creator declared that its source carries no personal data. |
| `data.datasetSlug` | string | yes | The dataset the rollup writes its cells to. |
| `data.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 no longer exists. |
| `data.dimensions` | array of string | yes | The fields each cell is grouped by, in declared order (at most 16). |
| `data.measures` | array of object | yes | The declared measures, in order (at most 64). |
| `data.measures.[]name` | string | yes | The measure's name: its key in each cell's `measures`. |
| `data.measures.[]agg` | string | yes | The aggregation: `count`, `last`, `sum`, `avg`, `min`, `max`, `count_distinct`, `p50`, `p95` or `p99`. |
| `data.measures.[]column` | string | no | The source field aggregated. Absent for `count`. |
| `data.windowSeconds` | integer | yes | The width of each cell's time window, in seconds. |
| `data.enabled` | boolean | yes | Whether the rollup is set to fold. |
| `data.reattestIntervalDays` | integer | yes | How many days each attestation lasts: 7, 30, 90 or 365. |
| `data.attestedAt` | string (date-time) | yes | When a person last confirmed the rollup (created or re-attested it). |
| `data.expiresAt` | string (date-time) | yes | `attestedAt` plus `reattestIntervalDays`. After it the rollup stops folding until it is re-attested. |
| `data.attestationStatus` | enum ("active", "expiring_soon", "expired") | yes | `expiring_soon` within 14 days of `expiresAt`, `expired` after it. |
| `data.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.lastFoldAt` | object | yes | When the last fold ran. Null if it has never run. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.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.createdAt` | string (date-time) | yes | When the rollup was created. |
| `meta` | object | 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:write. |
| 403 | `K9O_RBAC_DENY` | Only a person can re-attest; service, workload and extension tokens are refused (reason human_only). A session is required to re-attest a rollup: a personal access token alone is refused with `context.reason` `session_required`, and a service, workload or extension token with `human_only`. |
| 400 | `K9O_INVALID_REQUEST_SHAPE` | The request body does not match the schema. |

## Code samples

### cURL

```bash
curl -X POST 'https://<org>.api-<region>.k9o.io/@storefront/analytics/<datasetSlug>/rollups/<rollupId>/reattest' \
  -H 'Authorization: Bearer $K9O_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/analytics/<datasetSlug>/rollups/<rollupId>/reattest', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({}),
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o analytics rollups reattest <dataset> <rollup-id>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.rollups.reattest('<datasetSlug>', '<rollupId>', {})
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.analytics.rollups.reattest("<datasetSlug>", "<rollupId>", {})
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Analytics.Rollups.Reattest(ctx, "<datasetSlug>", "<rollupId>", map[string]any{})
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.analytics.rollups.reattest("<datasetSlug>", "<rollupId>", json!({})).await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.analytics().rollups().reattest("<datasetSlug>", "<rollupId>", Map.of())
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Analytics.Rollups.ReattestAsync("<datasetSlug>", "<rollupId>", new Dictionary<string, object> {  })
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.analytics.rollups.reattest("<datasetSlug>", "<rollupId>", {  })
```

### k9o/sdk

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


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/re-attest-rollup
