Updated on 2025-09-26 GMT+08:00

List of artifact tags in an artifact repository.

Function

This API is used to list the artifact tags in an artifact repository.

Constraints

None.

Calling Method

For details, see Calling APIs.

URI

GET /v2/instances/{instance_id}/namespaces/{namespace_name}/repositories/{repository_name}/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

ID of an SWR Enterprise Edition instance.

namespace_name

Yes

String

Namespace name.

repository_name

Yes

String

Repository name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Start index. The default value is 0. Note: The offset and limit parameters must be used together. The offset value must be 0 or a multiple of the limit value.

limit

No

Integer

Number of returned records. The default value is 10, and the maximum value is 100. Note: The offset and limit parameters must be used together. The offset value must be 0 or a multiple of the limit value.

is_accessory

No

Boolean

Whether to return the artifact attachment. The default value is true.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

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

Table 4 Response body parameters

Parameter

Type

Description

tags

Array of RepositoryTag objects

Artifact tag list.

total

Integer

Total number of artifacts.

Table 5 RepositoryTag

Parameter

Type

Description

name

String

Tag name.

artifact_id

Integer

Associated artifact ID.

digest

String

Associated artifact digest.

id

Integer

Tag ID.

repository_id

Integer

Artifact repository ID.

type

String

Artifact type, for example, IMAGE.

namespace_id

Integer

Namespace ID.

media_type

String

MIME type of the artifact.

manifest_media_type

String

MIME type of artifact metadata.

pull_time

String

Last pull time.

push_time

String

Last push time.

size

Integer

Artifact size, in bytes.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

encoded_authorization_message

String

Detailed rejection reason after encryption. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

encoded_authorization_message

String

Detailed rejection reason after encryption. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

encoded_authorization_message

String

Detailed rejection reason after encryption. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

encoded_authorization_message

String

Detailed rejection reason after encryption. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

encoded_authorization_message

String

Detailed rejection reason after encryption. You can call the API decode-authorization-message of STS to decrypt the reason.

Example Requests

GET https://{endpoint}/v2/instances/{instance_id}/namespaces/{namespace_name}/repositories/{repository_name}/tags

Example Responses

Status code: 200

The list of artifact tags in an artifact repository is queried successfully.

[ {
  "total" : 1,
  "tags" : [ {
    "artifact_id" : 1978,
    "id" : 3804,
    "name" : "latest",
    "pull_time" : "0001-01-01T00:00:00.000Z",
    "push_time" : "2021-02-03T10:22:11.840Z",
    "repository_id" : 402,
    "digest" : "sha256:3ee2a6bffb6dfec67be23fd0f6c0e8a48620277582e01800b4ad3c03ad0d9489",
    "manifest_media_type" : "application/vnd.docker.distribution.manifest.v2+json",
    "media_type" : "application/vnd.docker.container.image.v1+json",
    "namespace_id" : 87,
    "size" : 8049952,
    "type" : "IMAGE"
  } ]
} ]

Status Codes

Status Code

Description

200

The list of artifact tags in an artifact repository is queried successfully.

400

Request error.

401

Authentication failed.

403

Access denied.

404

Resource not found.

500

Internal error.

Error Codes

See Error Codes.