Querying the List of Images

Function

Query the list of images.

URI

GET /v2/manage/repos?filter=center::self|namespace::{namespace}|name::{name}|category::{category}|offset::{offset}|limit::{limit}|order_column::{order_column}|order_type::{order_type}

For details about parameters, see Table 1.

At least one filter parameter must be transferred.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

center

No

String

self (self image) or thirdparty (third-party image). By default, the value is self.

namespace

No

String

Organization name.

name

No

String

Image repository name.

category

No

String

Image repository type. The value can be app_server, linux, framework_app, database, lang, other, windows, or arm.

offset

No

String

Start index

Ensure that the offset and limit parameters are used together.

limit

No

String

Number of returned records

Ensure that the offset and limit parameters are used together.

order_column

No

String

Sorting criteria. The value can be name, updated_time, or tag_count.

Ensure that the order_column and order_type parameters are used together.

order_type

No

String

Sorting type. You can set this parameter to desc (descending sort) and asc (ascending sort).

Ensure that the order_column and order_type parameters are used together.

Request

N/A

Response

Response parameters

Table 2 Response header parameter description

Parameter

Type

Description

Content-Range

String

Offset (Start index)–Count (Number of records on the current page)/Total (Total number of records)

If the offset and limit parameters are transferred in the request, Content-Range will be added to the response header.

Table 3 Response body parameter description

Parameter

Type

Description

name

String

Repository name.

category

String

Repository type. The value can be app_server, linux, framework_app, database, lang, other, windows, or arm.

description

String

Repository description.

size

Integer

Image repository size.

is_public

Boolean

Whether the image is a public image. The value can be true or false.

num_images

Integer

Number of image tags in a repository.

num_download

Integer

Download times.

created_at

String

Time when a repository is created. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time.

updated_at

String

Time when a repository is updated. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time.

logo

String

(Reserved field) Repository logo.

url

String

(Reserved field) URL of the repository logo.

path

String

External container image download address. For example,

swr.cn-north-1.myhuaweicloud.com/namespace/repository.

internal_path

String

Internal container image download address. For example, 10.125.0.198:20202/namespace/repository.

domain_name

String

Username.

namespace

String

Organization name.

tags

Array of strings

Image tag list.

status

Boolean

(Reserved field) Status.

Response example
[
    {
        "name": "nginx",
        "category": "linux",
        "size": 200977474,
        "is_public": false,
        "num_images": 2,
        "num_download": 0,
        "created_at": "2017-01-01T00:00:00Z",
        "updated_at": "2017-09-11T03:00:02.542841141Z",
        "logo": "",
        "url": "",
        "path": "swr.cn-north-1.myhuaweicloud.com/namespace/repository",
        "internal_path": "10.125.0.198:20202/namespace/repository",
        "domain_name": "root",
        "namespace": "root",
        "tags": [
            "latest",
            "log"
        ],
        "status": false
    }
]

Status Code

For details about status code, see Table 4.

Table 4 Status code

Status Code

Description

200

The request is successfully sent.

400

Request error. Error information is returned.

401

Authentication failed.

500

Internal error. Error information is returned.