Help Center> SoftWare Repository for Container> API Reference> API> Querying the List of Image Tags

Querying the List of Image Tags

Function

Query all image tags of an image.

URI

GET /v2/manage/namespaces/{namespace}/repos/{repository}/tags?filter=offset::{offset}|limit::{limit}|order_column::{order_column}|order_type::{order_type}|tag::{tag}

For details about parameters, see Table 1.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

namespace

Yes

String

Organization name

repository

Yes

String

Image repository name

offset

No

Integer

Start index

limit

No

Integer

Number of responses

order_column

No

String

Sorting by column. You can set this parameter to updated_at (sorting by update time).

order_type

No

String

Sorting type. You can set this parameter to desc (descending sort) and asc (ascending sort).

tag

No

String

Image tag name

Request

N/A

Response

Response parameters

Table 2 Response body parameter description

Parameter

Type

Description

id

Integer

ID

repo_id

Integer

Repository ID

Tag

String

Image tag

image_id

String

Image ID

manifest

String

Image manifest

digest

String

SHA value of an image

schema

Integer

Docker protocol version. The value can be 1 or 2.

path

String

External image download address. For example,

swr.cn-north-1.myhuaweicloud.com/namespace/repository:tag.

internal_path

String

Internal image download address. For example, 10.125.0.198:20202/namespace/repository:tag.

size

Integer

Image size. The value ranges from 0 to 9223372036854775807.

is_trusted

Boolean

By default, the 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 was deleted.

Response example

[
    {
        "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.cn-north-1.myhuaweicloud.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
    }
]

Status Code

For details about status code, see Table 3.

Table 3 Status code

Status Code

Description

200

All tags in the image repository are successfully queried.

400

Request error. Error information is returned.

401

Authentication fails.

404

The repository does not exist.

500

Internal error. Error information is returned.