接口功能介绍
查询分享镜像列表
接口约束
无
URI
GET /v1/listSharedRepository
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
instanceId | 是 | Long | 实例ID | 1638470585571688449 | |
repositoryId | 否 | Long | 镜像仓库ID | 1695041896390332417 | |
namespaceName | 否 | String | 命名空间名称, 支持模糊匹配 | myns | |
repositoryName | 否 | String | 镜像仓库名称, 支持模糊匹配 | myrepo | |
userSharedWith | 否 | String | 要分享镜像的目标用户名称(docker login的用户名称) | crs-user1 | |
pageNum | 否 | Integer | 页码 | 1 | |
pageSize | 否 | Integer | 每页大小 | 10 | |
orderBy | 否 | String | 排序字段(namespaceName:命名空间名称, repositoryName:镜像仓库名称, createdTime:创建时间) | createdTime | |
order | 否 | String | 排序方式(desc:降序排序, asc:升序排序) | desc | |
regionId | 否 | String | 资源池编码 | d8bbd132b53a11e9b0e40242ac110002 |
请求参数
请求头header参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
Content-Type | 是 | String | 类型 | application/json | |
regionId | 是 | String | 资源池编码 | bb9fdb42056f11eda1610242ac110002 |
请求体body参数
无
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 响应码 | 0 | |
message | String | 返回信息 | ||
returnObj | Object | 返回结果 | returnObj | |
error | String | 错误信息 |
表 returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
total | Integer | 总条数 | 5 | |
size | Integer | 每页条数 | 10 | |
current | Integer | 当前页码 | 1 | |
pages | Integer | 总页数 | 1 | |
records | Object | 分享镜像列表 | records |
表 records
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
instanceId | Long | 实例ID | 1638470585571688449 | |
namespaceName | String | 命名空间名称 | myns | |
namespaceId | Long | 命名空间ID | 1681216403060948993 | |
repositoryName | String | 镜像仓库名称 | myrepo | |
repositoryId | Long | 镜像仓库ID | 1681247609415340034 | |
userSharedWith | String | 要分享镜像的目标用户名称(docker login的用户名称) | crs-user1 | |
owner | String | 镜像拥有者名称 | ent-user-07041 | |
imageUrl | String | 镜像公网地址 | ent-inst-07041-registry-ctyunnm8.crs.ctyun.cn:32099/ns-0718/test001 | |
imageUrlInternal | String | 镜像内网地址 | ent-inst-07041-registry-vpc-ctyunnm8.crs.ctyun.cn:32099/ns-0718/test001 | |
expirationTime | String | 分享的截止时间 | 2023-07-18 23:59:59 | |
disabled | Boolean | 是否禁用 | false | |
description | String | 描述 | desc | |
createdTime | String | 创建时间 | 2023-03-22 17:20:04 | |
modifiedTime | String | 修改时间 | 2023-03-22 17:20:04 |
枚举参数
无
请求示例
请求url
GET https://[endpoint].ctapi.ctyun.cn/v1/listSharedRepository?instanceId=1676198498712150017&pageNum=1&pageSize=10
请求头header
{
"Content-Type":"application/json"
}
请求体body
无
响应示例
{
"statusCode":0,
"message":"",
"returnObj":{
"records":[
{
"id":1684484896336547800,
"instanceId":1676198498712150000,
"namespaceName":"ns-0718",
"namespaceId":"1681216403060948993",
"repositoryName":"test001",
"repositoryId":1681247609415340000,
"userSharedWith":"ent-usre1",
"owner":"ent-user-07041",
"imageUrl":"ent-inst-07041-registry-ctyunnm8.crs.ctyun.cn: 32099/ns-0718/test001",
"imageUrlInternal":"ent-inst-07041-registry-vpc-ctyunnm8.crs.ctyun.cn: 32099/ns-0718/test001",
"expirationTime":"2023-11-21 10: 59: 56",
"disabled":false,
"description":"test2",
"status":1,
"createdBy":16005,
"createdTime":"2023-07-27 16: 44: 30",
"modifiedTime":"2023-07-27 16: 44: 30"
}
],
"total":"1",
"size":"10",
"current":"1",
"orders":[
],
"optimizeCountSql":true,
"hitCount":false,
"countId":null,
"maxLimit":null,
"searchCount":true,
"pages":"1"
}
}
状态码
请参考 状态码
错误码
请参考 错误码