更新时间:2022-02-22 GMT+08:00

查询镜像仓库列表

功能介绍

查询镜像仓库列表。

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}

参数说明请参见表1

至少要传递一个filter参数。

表1 参数说明

参数名称

是否必选

参数类型

描述

center

String

仅支持self,表示自有镜像。

namespace

String

组织名称

name

String

镜像仓库名称

category

String

镜像仓库分类,可设置为app_server、linux、framework_app、database、lang、other、windows、arm。

offset

String

起始索引。

注意:offset和limit参数需要配套使用。

limit

String

返回条数。

注意:offset和limit参数需要配套使用。

order_column

String

按列排序,可设置为name、updated_time、tag_count。

注意:order_column和order_type参数需要配套使用。

order_type

String

排序类型,可设置为desc(降序)、asc(升序)。

注意:order_column和order_type参数需要配套使用。

请求消息

  • 请求参数

  • 请求样例
    GET https://{Endpoint}/v2/manage/repos?filter=center::self|namespace::group|name::busybox

响应消息

  • 响应参数
    表2 Response Header参数说明

    参数

    参数类型

    描述

    Content-Range

    String

    offset(开始索引)-count(当前页记录条数)/total(总记录条数)

    如果请求时传入offset和limit参数,则在Response Header中会增加Content-Range。

    表3 Response Body参数说明

    参数

    参数类型

    描述

    [数组元素]

    Array of objects

    镜像仓库列表

    表4 [数组元素]参数说明

    参数

    参数类型

    描述

    name

    String

    镜像仓库名称

    category

    String

    镜像仓库类型,取值为app_server、linux、framework_app、database、lang、other、windows、arm。

    description

    String

    镜像仓库描述

    size

    Integer

    镜像仓库中镜像总大小

    is_public

    Boolean

    是否为公有镜像,值为true或false。

    num_images

    Integer

    镜像仓库下镜像版本数量

    num_download

    Integer

    下载次数

    created_at

    String

    镜像仓库创建时间,UTC日期格式,时间为UTC标准时间。

    updated_at

    String

    镜像仓库更新时间,UTC日期格式,时间为UTC标准时间。

    logo

    String

    镜像仓库logo地址(预留)

    url

    String

    镜像仓库logo的url地址(预留)

    path

    String

    集群外部docker pull地址,格式为{Repository address}/{Namespace name}/{Repository name}。

    internal_path

    String

    集群内部docker pull地址,格式为{Repository address}/{Namespace name}/{Repository name}。

    domain_name

    String

    帐号名

    namespace

    String

    组织名称

    tags

    Array of strings

    镜像版本列表

    status

    Boolean

    状态(预留)

    total_range

    Integer

    总记录条数

  • 响应样例
    [
        {
            "name": "busybox",
            "category": "linux",
            "description": "this is a busybox repository",
            "size": 200977474,
            "is_public": false,
            "num_images": 2,
            "num_download": 0,
            "created_at": "2021-06-10T03:24:44.784402Z",
            "updated_at": "2021-06-10T03:40:59.199352Z",
            "logo": "",
            "url": "",
            "path": "{Repository address}/group/busybox",
            "internal_path": "{Repository address}/group/busybox",
            "domain_name": "root",
            "namespace": "group",
            "tags": [
                "latest",
                "log"
            ],
            "status": false,
            "total_range": 1
        }
    ]

状态码

状态码

描述

200

请求成功

400

错误请求,返回错误信息。

401

鉴权失败的报错信息

500

服务器内部错误,返回错误信息。