Adding an Image Tag

Function

This API is used to add a tag to an image or update a tag.

Constraints

URI

POST /v2/{project_id}/images/{image_id}/tags

Table 1 lists the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

image_id

Yes

String

Specifies the image ID.

Request

Example Request

Adding an image tag (key1:value1)

1
2
3
4
5
6
7
POST https://{Endpoint}/v2/fd73a4a14a4a4dfb9771a8475e5198ea/images/67e17426-359e-49fb-aa12-0bd1756ec240/tags
{
   "tag": {
      "value": "value1",
      "key": "key1"
   }
}

Response

Returned Values