---
title: "Get Retention Policy"
method: GET
path: "/retentions/{id}"
tags: ["Retention"]
---

# Get Retention Policy

`GET /retentions/{id}`

Get Retention Policy.

## Path parameters

- `id` integer, required

## Headers

- `X-Request-Id` string

## Response `200`

Get Retention Policy successfully.

- RetentionPolicy — retention policy
  - `id` integer
  - `algorithm` string
  - `rules` RetentionRule[]
    - `id` integer
    - `priority` integer
    - `disabled` boolean
    - `action` string
    - `template` string
    - `params` object
    - `tag_selectors` RetentionSelector[]
      - `kind` string
      - `decoration` string
      - `pattern` string
      - `extras` string
    - `scope_selectors` object
  - `trigger` RetentionRuleTrigger
    - `kind` string
    - `settings` object
    - `references` object
  - `scope` RetentionPolicyScope
    - `level` string
    - `ref` integer

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal server error

---

[API](https://skmtc.dev/cerit/apis/harbor-api.md) · [All operations](https://skmtc.dev/cerit/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cerit/harbor-api/revisions/62d78801f8df/schema)
