Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Find retention rules

GET/v1/private/retention/rulesFind retention rules

List retention rules for the caller's workspace. Defaults to active only.

Parameters

pageinteger · int32query

default 1 · minimum 1

sizeinteger · int32query

default 10 · minimum 1

include_inactivebooleanquery

default false

Responses

200Retention rules pageapplication/json
objectRetentionRulePage_Public
contentarray of object
Show child attributes
Show array items
apply_to_pastboolean
catch_up_cursorstring · uuid

Current position of historical data cleanup

catch_up_doneboolean

Whether historical catch-up is complete

created_atstring · date-time
created_bystring
enabledboolean
idstring · uuid
last_updated_atstring · date-time
last_updated_bystring
levelstring

Computed from projectId and organizationLevel

one of "organization", "workspace", "project"

project_idstring · uuid
retentionstringrequired

one of "short_14d", "base_60d", "extended_400d", "unlimited"

workspace_idstring
pageinteger · int32
sizeinteger · int32
totalinteger · int64
Example response
{
  "content": [
    {
      "apply_to_past": true,
      "catch_up_cursor": "00000000-0000-0000-0000-000000000000",
      "catch_up_done": true,
      "created_at": "2026-06-09T00:00:00Z",
      "created_by": "string",
      "enabled": true,
      "id": "00000000-0000-0000-0000-000000000000",
      "last_updated_at": "2026-06-09T00:00:00Z",
      "last_updated_by": "string",
      "level": "organization",
      "project_id": "00000000-0000-0000-0000-000000000000",
      "retention": "base_60d",
      "workspace_id": "string"
    }
  ],
  "page": 0,
  "size": 0,
  "total": 0
}
Documentation menu