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
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. |
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
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
Parameter |
Type |
Description |
---|---|---|
tags |
Array of RepositoryTag objects |
Artifact tag list. |
total |
Integer |
Total number of artifacts. |
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
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
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
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
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
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.
Feedback
Was this page helpful?
Provide feedbackThank 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