Skip to main content
GET
Get registry retention

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Response

Successful Response

organisation_id
string
required
default
RegistryRetentionPolicy · object
required
platform_default
RegistryRetentionPolicy · object
required
source
enum<string>
required
Available options:
default,
organisation
updated_by
string | null
required
updated_at
string<date-time>
required
rules
RegistryRetentionRule · object[]
required

Repository rules, ordered by pattern byte by byte. Where patterns overlap, the most specific rule that matches a repository decides it: the pattern with the most characters other than *, and on a tie the first in this order.

recently_pulled_days
integer
required

Images pulled within this many days are kept under an organisation-set policy; 0 on the platform default.

runs_daily_at
string
required

When the organisation project's retention runs, HH:MM UTC.

space_freed_at
string
required

When deleted images stop counting against storage.

version
string
required

Opaque version of the stored policy and rules. Send it back as expected_version when saving; never parse it.

rule_slots
RegistryRetentionRuleSlots · object
required

How many of the registry's retention rules this retention takes in the organisation's project, out of how many the registry accepts. The organisation-wide default and every repository rule take one for keep_days (when above 0) and one for keep_latest, and the recently-pulled protection takes one; rules with the same keep_days, or the same keep_latest, share one wherever that cannot change which rule decides a repository. A save that would need more than limit is refused with 422.