• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. User Guide
  4. Operation Guide
  5. Container Registry
  6. Querying Tags of a Private Container Image Using an API

Querying Tags of a Private Container Image Using an API

You can query tags of a private container image using an API.

Before invoking an API, follow 4 in Connecting to the Private Container Registry to obtain the dockercfg file.

Request Header

Table 1 Request header

Name

Description

Example

Authorization

Length of the response body in octets.

Basic X2F1dGhfdG9rZW46N2JiNmYxOGVjYTdjNDliOGE3NzNiMDBjMGNlMzcwNWMtS0k5UlVSQzNFTU45WDFLQllTQkwtMjAxOTAzMTUwOTI0MTEtMTMxYTdkNGE1YmFkYzkwNDRmOTQ0YWExOTJkZmZmYWZkMGZjYTE4NmNjMjFlMzkwMDhlMDllMDA5NjhhOGZkMw==

Content-Type

Media type of the response body sent to the recipient.

application/json

URI

GET /index/repositories/{image-name} /properties

Request

N/A.

Response

Response parameters:

Table 1-6 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

repo

String

Name of a container image.

image_num

Int

Number of container images.

property

String

Type of a container image.

image_list

Table 3

Image list.

Table 3 Data structure of the image_list field

Parameter

Type

Description

tag

String

Tag name.

Example response:

{
    "repo": "newbee/index",
    "image_num": 4,
    "property": "private",
    "image_list": [
        {
            "tag": "v1"
        },
        {
            "tag": "v2"
        },
        {
            "tag": "v3"
        },
        {
            "tag": "v4"
        }
    ]
}

Status Code

Table 4 describes the status code of this API.

Table 4 Status code

Status Code

Description

200

This operation succeeds, and the private image tag information is returned.