接口功能介绍
查询实例列表
接口约束
无
URI
GET /v1/listInstance
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
regionId | 否 | String | 资源池编码 | bb9fdb42056f11eda1610242ac110002 | |
pageNum | 否 | Integer | 页码 | 1 | |
pageSize | 否 | Integer | 每页大小 | 10 | |
instanceName | 否 | String | 实例名称(包含匹配) | myInstance |
请求参数
请求头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 | |
instanceName | String | 实例名称 | personal | |
instanceType | String | 实例类型(personal:个人版, enterprise-basic: 企业版) | personal | |
userName | String | 用户名(用以推送、拉取镜像) | crs-user | |
region | String | 资源池编码 | d8bbd132b53a11e9b0e40242ac110002 | |
regionName | String | 资源池名称 | guizhouDev | |
publicAddress | String | 外网访问地址 | registry.guizhouDev.ccr.ctyun.com | |
internalAddress | String | 内网访问地址 | registry-vpc.guizhouDev.ccr.ctyun.com | |
state | String | 实例状态 | RUNNING | |
expirationTime | String | 实例过期时间(个人版实例无过期时间) | 2023-06-22 17:20:04 | |
createdTime | String | 实例开通时间 | 2023-03-22 17:20:04 |
枚举参数
无
请求示例
请求url
GET https://[endpoint].ctapi.ctyun.cn/v1/listInstance?pageNum=1&pageSize=10
请求头header
{
"Content-Type":"application/json"
}
请求体body
无
响应示例
{
"statusCode":0,
"message":"",
"returnObj":{
"records":[
{
"instanceId":1669386126085316600,
"instanceName":"personal",
"storageId":null,
"instanceType":"personal",
"userName":"crs-psn-user1",
"region":"d8bbd132b53a11e9b0e40242ac110002",
"regionName":"guizhouDev",
"publicAddress":"registry.guizhouDev.ccr.ctyun.com: 32099",
"internalAddress":"registry-vpc.guizhouDev.ccr.ctyun.com: 32099",
"state":"RUNNING",
"prodInstId":null,
"expirationTime":null,
"createdTime":"2023-06-16 08: 47: 22"
},
{
"instanceId":1669023179152674800,
"instanceName":"ent-user1",
"storageId":null,
"instanceType":"enterprise-basic",
"userName":"ent-usre1",
"region":"d8bbd132b53a11e9b0e40242ac110002",
"regionName":"guizhouDev",
"publicAddress":"ent-user1-registry-guizhouDev.crs.ctyun.cn: 30016",
"internalAddress":"ent-user1-registry-vpc-guizhouDev.crs.ctyun.cn: 30016",
"state":"RUNNING",
"prodInstId":null,
"expirationTime":"2023-09-16 08: 47: 22",
"createdTime":"2023-06-15 08: 45: 09"
}
],
"total":2,
"size":10,
"current":1,
"orders":[
],
"optimizeCountSql":true,
"hitCount":false,
"countId":null,
"maxLimit":null,
"searchCount":true,
"pages":1
}
}
状态码
请参考 状态码
错误码
请参考 错误码