Image tag#

Use image tag API operations to add and remove image tags.

Add image tag#

PUT /images/{image_id}/tags/{tag}

This operation adds the specified tag to the specified image.

Include the tag you want to add in the request URI {tag} path segment of the URI. For example, to tag image e7db3b45-8db7-47ad-8109-3fb55c2c24fd with miracle, use this URI: PUT /v2/images/e7db3b45-8db7-47ad-8109-3fb55c2c24fd/tags/miracle. The request body is ignored.

An image can only be tagged once with a specific string. Multiple attempts to tag an image with the same string will result in a single instance of that string being added to the image’s tags list.

This table shows the possible response codes for this operation:

Response Code

Name

Description

204

Success

Request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

415

Bad Media Type

Bad media type. This may result if the wrong media type is used in the cURL request.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

UUID

Image ID stored through the image API, typically a UUID.

{tag}

String

Image tag (may be up to 255 characters in length).

This operation does not accept a request body.

Response#

This operation does not return a response body.

Delete image tag#

DELETE /images/{image_id}/tags/{tag}

This operation deletes the specified tag from the specified image.

Include the tag you want to remove in the request URI {tag} path segment of the URI. For example, to remove the image tag miracle from image e7db3b45-8db7-47ad-8109-3fb55c2c24fd, use the following URI in the request: DELETE /v2/images/e7db3b45-8db7-47ad-8109-3fb55c2c24fd/tags/miracle. The request body is ignored.

An image tag can only be removed once. Subsequent attempts to remove the same tag cause an HTTP 404 error.

This table shows the possible response codes for this operation:

Response Code

Name

Description

204

Delete Successful

Delete request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

404

Not Found

Resource not found.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

UUID

Image ID stored through the image API, typically a UUID.

{tag}

String

Image tag (may be up to 255 characters in length).

This operation does not accept a request body.

Response#

This operation does not return a response body.