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

查看共享镜像列表

功能介绍

查看共享镜像列表。

URI

GET /v2/manage/shared-repositories?filter=center::{center}|name::{name}|limit::{limit}|offset::{offset}

参数说明请参见表1

表1 参数说明

参数名称

是否必选

参数类型

描述

center

String

  • self:我共享的镜像
  • thirdparty:他人共享给我的镜像

name

String

镜像仓库名称

limit

String

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

offset

String

起始索引。注意:offset和limit参数需要配套使用。

请求消息

  • 请求参数

  • 请求样例
    GET https://{Endpoint}/v2/manage/shared-repositories?filter=center::self|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

    • 查询他人共享镜像:共享是否过期
    • 查询我共享的镜像:默认为false,无意义

    total_range

    Integer

    总记录条数

  • 响应样例
    [
        {
            "name": "busybox",
            "category": "other",
            "description": "",
            "size": 115645792,
            "is_public": false,
            "num_images": 1,
            "num_download": 0,
            "created_at": "2021-06-02T09:23:01.751202Z",
            "updated_at": "2021-06-10T07:24:35.204517Z",
            "logo": "",
            "url": "",
            "path": "{Repository address}/group/busybox",
            "internal_path": "{Repository address}/group/busybox",
            "domain_name": "domain",
            "namespace": "namespace",
            "tags": [
                "v1",
                "v2"
            ],
            "status": true,
            "total_range": 1
        }
    ]

状态码

状态码

描述

200

请求成功

400

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

401

鉴权失败的报错信息

500

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