Obtaining an Image Retention Policy Record
Function
Obtain the details of an image retention policy.
URI
GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/{retention_id}
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: Deleting an Image Retention Policy
Next Article: Modifying an Image Retention Policy
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.