接口功能介绍
查询分享镜像详情
接口约束
无
URI
GET /v1/getSharedRepository
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
instanceId | 是 | Long | 实例ID | 1638470585571688449 | |
repositoryId | 是 | Long | 镜像仓库ID | 1695041896390332417 | |
userSharedWith | 是 | String | 要分享镜像的目标用户名称(docker login的用户名称) | crs-user1 |
请求参数
请求头header参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
Content-Type | 是 | String | 类型 | application/json | |
regionId | 是 | String | 资源池编码 | bb9fdb42056f11eda1610242ac110002 |
请求体body参数
无
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 响应码 | 0 | |
message | String | 返回信息 | ||
returnObj | Object | 镜像分享详情 | returnObj | |
error | String | 错误信息 |
表 returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
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/getSharedRepository?instanceId=1676198498712150017&repositoryId=1695041896390332417&userSharedWith=ent-usre1
请求头header
{
"Content-Type":"application/json"
}
请求体body
无
响应示例
{
"statusCode":0,
"message":"",
"returnObj":{
"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",
"createdTime":"2023-07-27 16: 44: 30",
"modifiedTime":"2023-07-27 16: 44: 30"
}
}
状态码
请参考 状态码
错误码
请参考 错误码