Obtaining Image Retention Records
Function
Obtain image retention records.
URI
GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/histories?offset={offset}&limit={limit}
Table 1 describes the parameters.
Request
NA
Response
Response parameters
| Parameter | Type | Description |
|---|---|---|
| Content-Range | String | Offset (Start index)–Count (Number of records on the current page)/Total (Total number of records) |
If the offset and limit parameters are transferred in the request, Content-Range will be added to the response header.
| Parameter | Type | Description |
|---|---|---|
| retention_log | Array of object | For details, see Table 4. |
| total | Interger | Total number. |
| Parameter | Type | Description |
|---|---|---|
| created_at | String | Creation time |
| id | Interger | ID |
| namespace | String | Organization name |
| repo | String | Image repository name |
| retention_id | Interger | Image retention policy ID |
| rule_type | String | Policy |
| tag | String | Image tag |
Response example
{
"retention_log": [
{
"created_at": "2020-04-17T08:01:09.658309Z",
"id": 9088,
"namespace": "hwstaff_l00283074",
"repo": "experience_2048",
"retention_id": 91,
"rule_type": "{\"template\":\"tag_rule\",\"params\":{\"num\":\"7\"},\"tag_selectors\":[]}",
"tag": "4"
}
],
"total": 1
} Status Code
Table 5 describes the status codes of this API.
Last Article: Modifying an Image Retention Policy
Next Article: Appendixes
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.