• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. API Reference
  4. Native OpenStack APIs
  5. Image Tagging (Native OpenStack APIs)
  6. Adding a Tag

Adding a Tag

Function

This API is used to add a custom tag to an image. With tags, you can manage easily the images.

URI

  • URI format

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

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    image_id

    Yes

    String

    Specifies the image ID.

    tag

    Yes

    String

    Specifies the tag to be added.

    The tag can contain only digits, letters, underscores (_), and hyphens (-).

Request

Example request
PUT /v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90/tags/aaaa

Response

STATUS CODE 204

Returned Values

  • Normal

    204

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.