---
title: "Get retention rule by id"
method: GET
path: "/v1/private/retention/rules/{ruleId}"
tags: ["Retention Rules"]
---

# Get retention rule by id

`GET /v1/private/retention/rules/{ruleId}`

Get a specific retention rule by id

## Path parameters

- `ruleId` string, uuid, required

## Response `200`

Retention rule

- RetentionRulePublic
  - `id` string, uuid
  - `workspace_id` string
  - `project_id` string, uuid
  - `level` 'organization' | 'workspace' | 'project' — Computed from projectId and organizationLevel
  - `retention` 'short_14d' | 'base_60d' | 'extended_400d' | 'unlimited', required
  - `apply_to_past` boolean
  - `enabled` boolean
  - `created_by` string
  - `created_at` string, date-time
  - `last_updated_by` string
  - `last_updated_at` string, date-time
  - `catch_up_cursor` string, uuid — Current position of historical data cleanup
  - `catch_up_done` boolean — Whether historical catch-up is complete

## Other responses

- `404` — Retention rule not found

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
