• Cloud Container Engine

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

Querying a Private Container Image Using an API

You can query 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. The value of the auth parameter is retrieved from the dockercfg file.

Basic X2F1dGhfdG9rZW46N2JiNmYxOGVjYTdjNDliOGE3NzNiMDBjMGNlMzcwNWMtS0k5UlVSQzNFTU45WDFLQllTQkwtMjAxOTAzMTUwOTI0MTEtMTMxYTdkNGE1YmFkYzkwNDRmOTQ0YWExOTJkZmZmYWZkMGZjYTE4NmNjMjFlMzkwMDhlMDllMDA5NjhhOGZkMw==

Content-Type

Media type of the response body sent to the recipient.

application/json

URI

GET /v1/search

Request

N/A.

Response

Response parameters:

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

query

String

Query path.

num_results

int

Result num.

results

Table 3

-

Table 3 Data structure of the results field

Parameter

Type

Description

name

String

Image name.

Example response:

{
    "query": "newbee/",
    "num_results": 4,
    "results": [
        {
            "star_count": 0,
            "is_official": false,
            "name": "newbee/redis",
            "is_trusted": false,
            "description": "",
            "download_num": 57,
            "size": 0,
            "automated": false,
            "property": "private"
        },
        {
            "star_count": 0,
            "is_official": false,
            "name": "newbee/apache-php",
            "is_trusted": false,
            "description": "",
            "download_num": 14,
            "size": 0,
            "automated": false,
            "property": "private"
        },
        {
            "star_count": 0,
            "is_official": false,
            "name": "newbee/pause",
            "is_trusted": false,
            "description": "",
            "download_num": 1,
            "size": 0,
            "automated": false,
            "property": "private"
        },
        {
            "star_count": 0,
            "is_official": false,
            "name": "newbee/test",
            "is_trusted": false,
            "description": "",
            "download_num": 274,
            "size": 0,
            "automated": false,
            "property": "private"
        }
    ]
}

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 container image information is returned.