查询实例列表信息
更新时间 2025-12-16 18:20:52
最近更新时间: 2025-12-16 18:20:52
接口功能介绍
此接口提供云搜索服务实例信息分页查询功能。
接口约束
1.入参必填字段必须按请求body参数传入
2.入参类型必须按请求body参数表格传入
3.本接口不支持Logstash类型实例查询
URI
POST /os/openapi/v1/cluster/selectInstancePage
路径参数 无
Query参数 无
请求参数
请求头header参数 无
请求体body参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionId | 是 | String | 资源池id,云搜索服务当前支持的资源池参考文档 | bb9fdb42056f11eda1610242ac110002 | |
| pageIndex | 是 | Integer | 当前页,参数值需为正整数 | 1 | |
| pageSize | 是 | Integer | 每页大小,参数值需为正整数 | 10 | |
| clusterName | 否 | String | 实例名称 | ostest | |
| clusterType | 是 | Integer | 实例类型: 1:OpenSearch 2:Elasticsearch | 1 | |
| projectId | 否 | String | 企业项目编码 | 0 | |
| clusterStateList | 否 | Array of Integers | 需要查询的实例状态。 1:创建中 2:运行中 3:处理中 4:释放中 5:已销毁 6:异常 7:处理中(重启) 8:处理中(扩容) 10:已冻结 11:处理中(重置密码) 12:处理中(配置变更) 13:处理中(升配) 14:处理中(磁盘扩容) 15:处理中(开启备份) 16:处理中(加装Logstash) 17:处理中(Logstash退订) 18:处理中(开通云日志) 19:处理中(关闭云日志) | [1,2] | |
| isQueryNet | 否 | Boolean | 是否查询实例图形化节点公网地址 true:查询(默认值) false:不查询,不查询时,响应参数中componentUrl、ipv6ComponentUrl固定返回null | true |
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 状态码,成功:200,失败:500 | 200 | |
| error | String | 错误码,请求成功时,不返回该字段 | OS_400000 | |
| message | String | 用来简述当前接口调用状态以及必要提示信息 | 请求成功 | |
| returnObj | Object | 返回结果 | 表 returnObj | |
| 表 returnObj |
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| total | Integer | 总实例数量 | 23 | |
| records | Array of Objects | 集群列表 | 表records | |
| pageIndex | Integer | 当前页,参数值需为正整数 | 1 | |
| pageSize | Integer | 每页大小,参数值需为正整数 | 10 | |
| 表 records |
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| clusterId | String | 实例id | OpenSearch-UTLGQLHQPJNJSDCRPPJBP | |
| clusterName | String | 实例名称 | ostest | |
| clusterState | String | 实例状态 | 运行中 | |
| clusterStateType | Integer | 实例状态类型: 1:创建中 2:运行中 3:处理中 4:释放中 5:已销毁 6:异常 7:处理中(重启) 8:处理中(扩容) 10:已冻结 11:处理中(重置密码) 12:处理中(配置变更) 13:处理中(升配) 14:处理中(磁盘扩容) 15:处理中(开启备份) 16:处理中(加装Logstash) 17:处理中(Logstash退订) 18:处理中(开通云日志) 19:处理中(关闭云日志) | 2 | |
| processType | Integer | 创建中的进度: 17:开通主机资源正在开通中,进度30% 18:资源正在开通中,进度50% 3:后端服务正在开通中,进度70% 4:云搜索服务正在开通中,进度90% | ||
| releaseVersion | String | 发布版本 | 云搜索-1.2.0 | |
| indexNum | String | 索引数量 | 2 | |
| storageUsage | String | 存储总用量,-1时表示异常 | 1.86G | |
| storagePercent | String | 存储百分比 | 0 | |
| clusterType | Integer | 实例类型: 1:表示OpenSearch 2:表示Elasticsearch | 1 | |
| clusterTypeName | String | 类型名称 | Ostest | |
| clusterTypeVersion | String | 实例版本 | 2.9.0 | |
| payType | String | 付费类型 | 包年包月 | |
| clusterDueTime | Integer | 实例到期时间 | 1745033321000 | |
| createTime | Integer | 创建时间 | 1742353726000 | |
| componentUrl | String | 组件访问链接 :为空则未绑定公网 | ||
| ipv6ComponentUrl | String | 组件ipv6访问链接:为空则为绑定 | ||
| clusterMessage | String | 错误原因 异常撤单的会有原因 | 实例开通失败,已自动退单,失败原因:后端服务部署失败 | |
| enableIpv6 | String | OPEN: 开启ipv6 CLOSE:关闭ipv6 NOT_DISPLAY:ipv6按钮不在页面展示 | CLOSE | |
| componentName | String | 实例组件列表 | kibana,cerebro | |
| projectId | String | 企业项目编码 | 0 | |
| projectName | String | 企业项目名称 | default |
枚举参数
无
请求示例
请求url
https://ctcsx-global.ctapi.ctyun.cn/os/openapi/v1/cluster/selectInstancePage
请求头header
无
请求体body
{
"regionId":"bb9fdb42056f11eda1619242ac110002",
"pageIndex":1,
"pageSize":10,
"clusterType": 1,
}
响应示例
请求成功示例:
{
"statusCode": 200,
"message": "success",
"returnObj": {
"records": [
{
"clusterId": "Elasticsearch-CAQPBFJJLMKODRDPFH",
"clusterName": "test",
"clusterState": "运行中",
"clusterStateType": 2,
"releaseVersion": "云搜索-1.2.0",
"indexNum": "2",
"storageUsage": "1.86G",
"storagePercent": 0,
"clusterType": 2,
"clusterTypeName": "Elasticsearch",
"clusterTypeVersion": "7.10.2",
"payType": "包年包月",
"clusterDueTime": 1745033321000,
"createTime": 1742353726000,
"componentUrl": null,
"ipv6ComponentUrl": null,
"cerebroIpv4Url": null,
"cerebroIpv6Url": null,
"clusterMessage": null,
"enableIpv6": "OPEN",
"processType": null,
"componentName": "kibana,cerebro",
"projectId": "0",
"projectName": "default"
}
],
"total": 1,
"pageSize": 10,
"pageIndex": 1
}
}
请求失败示例:
{
"statusCode": 500,
"error": "OS_400000",
"message": "请求失败"
}
ak 传错示例:
{
"statusCode": "CTAPI_10002",
"returnObj": {
},
"code": "10002",
"message": "ctyun-EOP: Invalid APP ID in request",
"error": "10002",
"requestId": "b0747f9e5ef24a7e95ad9324dbe6d885",
"eopErrCode": "10002"
}
sk传错示例:
{
"statusCode": "CTAPI_10009",
"returnObj": {
},
"code": "10009",
"message": "ctyun-EOP: signature verification failed",
"error": "10009",
"requestId": "ee133410bed24812b8f70cc27299401b",
"eopErrCode": "10009"
}
请求参数类型错误示例:
{
"statusCode": 500,
"error": "OS_401001",
"message": "请求参数类型错误",
"returnObj": "{\"cluster_Name\": \"应为字符串\"}"
}
请求参数值无效示例:
{
"statusCode": 500,
"error": "OS_401002",
"message": "请求参数值无效",
"returnObj": "{\"regionId\":\"must not be blank\"}"
}
资源池不存在示例:
{
"statusCode": 500,
"error": "OS_401003",
"message": "资源池id不存在",
"returnObj": {}
}
用户无权限:
{
"statusCode": 500,
"error": "OS_401004",
"message": "非法操作",
"returnObj": {}
}
状态码
请参考 状态码
错误码
请参考 错误码