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

Deleting an Artifact Tag

Function

This API is used to delete an artifact tag.

Constraints

None

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/instances/{instance_id}/namespaces/{namespace_name}/repositories/{repository_name}/tags/{tag_name}

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.

tag_name

Yes

String

Tag name.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 204

The artifact tag is deleted successfully .

Status code: 400

Table 3 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 4 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 5 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 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: 500

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.

Example Requests

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

Example Responses

None

Status Codes

Status Code

Description

204

The artifact tag is deleted successfully .

400

Request error.

401

Authentication failed.

403

Access denied.

404

Resource not found.

500

Internal error.

Error Codes

See Error Codes.