1.接口协议:
GET https://[endpoint].ctapi.ctyun.cn/v2/instances/query
请求参数 | 是否必填 | 位置 | 参数类型 | 说明 |
pageNum | 否 | url | String | 分页中的页数,默认1 |
pageSize | 否 | url | String | 分页中的每页大小,默认10 |
prodInstId | 否 | url | String | 实例Id,如果填入,则返回指定实例信息 |
响应参数 | 参数类型 | 描述 |
statusCode | String | 接口系统层面状态码。成功:800,失败:900 |
message | String | 描述状态 |
returnObj | String | 返回对象。此参数所包含的参数请见“响应示例"里面的注释 |
返回值data参数说明
字段 | 类型 | 描述 |
cluster | String | 实例ID |
clusterName | String | 实例名称 |
status | Int | 状态 1正常,2暂停,3注销 |
prodType | String | 产品规格类型:10009002基础版,10009001高级版 |
createTime | Long | 创建时间,时间戳 |
expireTime | Long | 过期时间,时间戳 |
securityGroup | String | 安全组 |
network | String | 网络 |
subnet | String | 子网 |
2.请求示例:
GET https://[endpoint].ctapi.ctyun.cn/v2/instances/query
3.返回示例:
成功响应示例
{
"returnObj": {
"total": 3,
"data": [
{
"cluster": "9b9bea76b7ce412ca18f99ccc1ea717b",
"subnet": "default_subnet",
"expireTime": 1664449770000,
"createTime": 1661771370000,
"clusterName": "test",
"securityGroup": "test555",
"prodType": "10009101",
"status": 1,
"network": "default_network"
}
]
},
"message": "success",
"statusCode": "800"
}
失败响应示例
{
"returnObj": {},
"message": null,
"statusCode": "900"
}