Skip to main content
POST
/
datasets
/
{dataset_id}
/
retention-policy
/
preview
Preview snapshot expirations
curl --request POST \
  --url https://api-dev.narrative.io/datasets/{dataset_id}/retention-policy/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "expire_everything"
}
'
{
  "snapshots_to_expire": [
    {
      "snapshot_id": 8840810861846963000,
      "created_at": "2022-01-28T16:25:47.987Z"
    },
    {
      "snapshot_id": 6511121635994506000,
      "created_at": "2022-01-28T16:58:59.264Z"
    },
    {
      "snapshot_id": 4359653450296158700,
      "created_at": "2022-01-28T17:33:25.560Z"
    },
    {
      "snapshot_id": 7422070807769186000,
      "created_at": "2022-01-28T18:58:45.856Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
integer
required

Unique identifier for a dataset.

Body

application/json

Backwards-compatible legacy payloads. Interpreted as snapshot-level retention on Iceberg. Returned response will be unified v1 shape with compat.mode=legacy.

type
enum<string>
Available options:
expire_everything

Response

200 - application/json

OK

snapshots_to_expire
object[]

A list of the existing snapshots for the dataset