更新时间:2025-08-14 GMT+08:00
分享

查询共享仓库列表(V3)

功能介绍

查询共享仓库列表详情。

调用方法

请参见如何调用API

URI

GET /v3/manage/shared-repositories

表1 Query参数

参数

是否必选

参数类型

描述

namespace

String

组织名称。小写字母开头,后面跟小写字母、数字、小数点、下划线或中划线(其中下划线最多允许连续两个,小数点、下划线、中划线不能直接相连),小写字母或数字结尾,1-64个字符。

name

String

镜像仓库名称。小写字母或数字开头,后面跟小写字母、数字、小数点、斜杠、下划线或中划线(其中下划线最多允许连续两个,小数点、斜杠、下划线、中划线不能直接相连),小写字母或数字结尾,1-128个字符。如果您的镜像名称repository参数中有斜杠,请先替换成$再进行请求。

shared_by

String

共享方式,只能填写self或者thirdparty。self: 我共享的镜像。thirdparty: 他人共享给我的镜像

status

Boolean

查询他人共享给我的镜像是否已过期 false:共享已过期。true:正常

limit

Integer

查询返回镜像仓库列表当前页面的数量。 每页默认值是100,最多返回1000条镜像仓库的信息

marker

Integer

分页查询时起始标记,接口的返回值nextMarker为下一次查询的起始标记。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

消息体的类型(格式),下方类型可任选其一使用:

application/json;charset=utf-8

application/json

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

nextMarker

Integer

下一次分页查询的起始ID。如果未返回该值,则表示数据已查询完毕

repos

Array of

ShowSharedRepoRespV3 object

共享的repos列表

表4 ShowSharedRepoRespV3

参数

参数类型

描述

id

Integer

仓库编号

name

String

仓库名称

category

String

仓库类型

description

String

仓库描述信息

size

Long

仓库大小

is_public

Boolean

是否为公开仓库

num_images

Integer

仓库中镜像个数,0 ~ 9223372036854775807

num_download

Integer

仓库下载次数

created_at

String

仓库创建时间,UTC日期格式,时间为UTC标准时间,用户需要根据本地时间计算偏移量;如东8区需要+8:00

updated_at

String

仓库更新时间,UTC日期格式,时间为UTC标准时间,用户需要根据本地时间计算偏移量;如东8区需要+8:00

domain_name

String

仓库所属租户名

namespace_name

String

仓库所属的组织名称

status

Boolean

他人共享的镜像是否已过期

请求示例

响应示例

状态码:200

查询共享仓库列表成功

{
  "nextMarker" : 93,
  "repos" : [ {
    "category" : "other",
    "created_at" : "2025-03-25T07:20:22.146337Z",
    "description" : "",
    "domain_name" : "test",
    "id" : 93,
    "is_public" : false,
    "name" : "test",
    "namespace_name" : "test-ns",
    "num_download" : 21,
    "num_images" : 23,
    "size" : 1187369474,
    "status" : true,
    "updated_at" : "2025-04-11T09:49:13.193507Z"
  } ]
}

状态码

状态码

描述

200

查询共享仓库列表成功

400

错误请求

401

鉴权失败

500

服务内部错误

错误码

请参见错误码

相关文档