• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. API Reference
  4. APIs
  5. Image Tagging (Extension APIs)
  6. Querying Image Tags

Querying Image Tags

Function

This API is used to query all the tags of a specified image.

URI

  • URI format
    GET /v2/{project_id}/images/{image_id}/tags
  • 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
GET /v2/fd73a4a14a4a4dfb9771a8475e5198ea/images/67e17426-359e-49fb-aa12-0bd1756ec240/tags

Response

  • Parameter description

    Parameter

    Type

    Description

    tags

    List< resource_tag >

    Lists the tags.

  • Data structure description of the resource_tag field

    Parameter

    Type

    Description

    key

    String

    Specifies the tag key.

    value

    String

    Specifies the tag value.

  • Example response
    STATUS CODE 200
    {
       "tags": [{
          "value": "value0",
          "key": "key0"
       },
       {
          "value": "value0",
          "key": "key1"
       }]
    }

Returned Values

  • Normal

    200

  • 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.