Get registry retention
import requests
url = "https://platform.ankra.app/api/v1/org/registry-storage/retention"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/registry-storage/retention', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/registry-storage/retention \
--header 'Authorization: Bearer <token>'{
"organisation_id": "<string>",
"default": {
"keep_days": 1825,
"keep_latest": 500
},
"platform_default": {
"keep_days": 1825,
"keep_latest": 500
},
"source": "default",
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"rules": [
{
"id": "<string>",
"repository_pattern": "<string>",
"application_id": "<string>",
"keep_days": 123,
"keep_latest": 123,
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"recently_pulled_days": 123,
"runs_daily_at": "<string>",
"space_freed_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Credentials
Get registry retention
Read which images the organisation keeps: its project-wide retention policy (or the platform default), its per-repository rules, the protections every organisation-set policy carries, when retention runs and when deleted images stop counting against storage. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).
GET
/
api
/
v1
/
org
/
registry-storage
/
retention
Get registry retention
import requests
url = "https://platform.ankra.app/api/v1/org/registry-storage/retention"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/registry-storage/retention', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/registry-storage/retention \
--header 'Authorization: Bearer <token>'{
"organisation_id": "<string>",
"default": {
"keep_days": 1825,
"keep_latest": 500
},
"platform_default": {
"keep_days": 1825,
"keep_latest": 500
},
"source": "default",
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"rules": [
{
"id": "<string>",
"repository_pattern": "<string>",
"application_id": "<string>",
"keep_days": 123,
"keep_latest": 123,
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"recently_pulled_days": 123,
"runs_daily_at": "<string>",
"space_freed_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
default, organisation Show child attributes
Show child attributes
Images pulled within this many days are kept under an organisation-set policy; 0 on the platform default.
When the organisation project's retention runs, HH:MM UTC.
When deleted images stop counting against storage.