Querying the List of Image Tags
Function
This API is used to query the list of image tags.
Constraints
None
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
swr:repo:listRepoTags
List
repo *
-
-
-
URI
GET /v2/manage/namespaces/{namespace}/repos/{repository}/tags
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| namespace | Yes | String | Organization name. Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. |
| repository | Yes | String | Image repository name. The name contains 1 to 128 characters, starting and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. If the parameter value contains a slash (/), replace it with a dollar sign ($) before sending the request. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Number of returned records. Parameters offset and limit should always be used together. If this parameter is not passed, 100 records are returned by default. A maximum of 1,000 records can be returned. |
| offset | No | Integer | Start index. Parameters offset and limit should always be used together. |
| order_column | No | String | Sorting by column. You can set this parameter to updated_at (update time) or tag (tag name). Parameters order_column and order_type should always be used together. |
| order_type | No | String | Sorting type. You can set this parameter to desc (descending order) or asc (ascending order). Parameters order_column and order_type parameters should be used together. |
| tag | No | String | Image tag name |
| filter | No | String | Enter offset::{offset}|limit::{limit}|order_column::{order_column}|order_type::{order_type}|tag::{tag}. limit indicates the number of returned records. offset indicates the start index. Parameters offset and limit should always be used together. order_column indicates sorting by column. The value can be updated_at (update time) or tag (tag name). order_type indicates the sorting type. The value can be desc (descending order) or asc (ascending order). tag indicates the image tag name. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Message body type (format). Possible values: application/json;charset=utf-8 application/json |
| X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| Content-Range | String | offset (start index) – count (number of records on the current page)/total (total number of records) |
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of ShowReposTagResp objects | Image tag list |
| Parameter | Type | Description |
|---|---|---|
| id | Long | Tag ID |
| repo_id | Long | Repository ID |
| Tag | String | Image tag name |
| image_id | String | Image ID |
| manifest | String | Image manifest |
| digest | String | Hash value of an image |
| schema | Long | Docker protocol version, which can be 1 or 2. |
| path | String | Image pull path. The format is swr.example.com/namespace/repository:tag. |
| internal_path | String | Internal image pull address. For example, 10.125.0.198:20202/namespace/repository:tag. |
| size | Long | Image size, ranging from 0 to 9,223,372,036,854,775,807. |
| is_trusted | Boolean | The default value is false. |
| created | String | Time when an image is created. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time. |
| updated | String | Time when an image is updated. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time. |
| deleted | String | Time when an image is deleted. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time. |
| domain_id | String | Account ID. |
| scanned | Boolean | Whether the image has been scanned. |
| tag_type | Long | 0: manifest; 1: manifest list |
Example Requests
GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/tags Example Responses
Status code: 200
[ {
"id" : 0,
"repo_id" : 0,
"Tag" : "latest",
"image_id" : "741f24a795d6d93d7c6edd11780d63c13e16c39615dd9d223378a57a836f2ee6",
"manifest" : "{\"schemaVersion\":2,\"mediaType\":\"application/vnd.docker.distribution.manifest.v2+json\",\"config\":{\"mediaType\":\"application/vnd.docker.container.image.v1+json\",\"size\":1862,\"digest\":\"sha256:741f24a795d6d93d7c6edd11780d63c13e16c39615dd9d223378a57a836f2ee6\"},\"layers\":[{\"mediaType\":\"application/vnd.docker.image.rootfs.diff.tar.gzip\",\"size\":1292800,\"digest\":\"sha256:8ac8bfaff55af948c796026ee867448c5b5b5d9dd3549f4006d9759b25d4a893\"},{\"mediaType\":\"application/vnd.docker.image.rootfs.diff.tar.gzip\",\"size\":10240,\"digest\":\"sha256:77ddbf3a9fe11e81761a0f9df43a28e3e6f29bbb53c0c8cf71cd7efa69729aed\"}]}",
"digest" : "sha256:57b605845a6367c34bfb6ea6477f16852f59aa1861a2b51d10ab77ae0a1dc9c3",
"schema" : 2,
"path" : "swr.example.com/namespace/busybox:latest",
"internal_path" : "10.125.0.198:20202/namespace/busybox:latest",
"size" : 1304902,
"is_trusted" : false,
"created" : "2018-07-06T06:18:55Z",
"updated" : "2018-07-06T06:18:55Z",
"deleted" : null,
"domain_id" : "050*****************6d70a9600",
"scanned" : false,
"tag_type" : 0
} ] Status Codes
| Status Code | Description |
|---|---|
| 200 | The list of image tags is queried successfully. |
| 400 | An request error occurred. |
| 401 | The authentication failed. |
| 404 | The image repository does not exist. |
| 500 | An internal error occurred. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot