Obtaining the List of Image Retention Policies
Function
Obtain the list of image retention policies.
URI
GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions
Table 1 describes the parameters.
Request
NA
Response
Response parameters
| Parameter | Type | Description |
|---|---|---|
| algorithm | String | Retention policy matching rule. The value is or. |
| id | Interger | ID |
| rules | Array of object | For details, see Table 3. |
| scope | String | Reserved field |
Response example
[
{
"algorithm": "or",
"id": 222,
"rules": [
{
"params": {
"days": "30"
},
"tag_selectors": [
{
"kind": "label",
"pattern": "v5"
},
{
"kind": "label",
"pattern": "1.0.1"
},
{
"kind": "regexp",
"pattern": "^123$"
}
],
"template": "date_rule"
}
],
"scope": ""
}
]
Status Code
Table 3 describes the status codes of this API.
Last Article: Adding an Image Retention Policy
Next Article: Deleting an Image Retention Policy
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.