硅云帮助文档中心
搜索文档
热门搜索词:
产品简介
产品定价
入门指南
经典案例
快照
常见问题
知识拓展
名词解释
API参考
搜索实例
搜索实例
/ncs-server/api/v1/host/search
GET
字段 | 类型 | 最大长度 | 参数位置 | 默认选填 | 描述 |
page | int | 10 | RequestBody | 页,默认1 第一页 | |
row | int | 10 | RequestBody | 默认10 一页10行,最大 100 | |
ip | string | RequestBody | 公网ip地址 | ||
status | string | 16 | RequestBody | 实例状态 | |
projectId | string | 32 | RequestBody | 项目id | |
areaMark | string | 32 | RequestBody | 地区标识 | |
securityGroupId | string | 32 | RequestBody | 安全组id | |
autoRenew | boolean | 1 | RequestBody | 是否开启了自动续费,true为已开启 | |
id | string | 32 | RequestBody | 实例Id,模糊查询,精确查询请通过根据实例id获取实例接口 | |
fromCreateTime | long | 64 | RequestBody | 创建时间时间戳左区间,精确到毫秒 | |
toCreateTime | long | 64 | RequestBody | 创建时间时间戳右区间,精确到毫秒 | |
fromEndTime | long | 64 | RequestBody | 过期时间时间戳左区间,精确到毫秒 | |
toEndTime | long | 64 | RequestBody | 过期时间时间戳右区间,精确到毫秒 |
GET /ncs-server/api/v1/host/search HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: 82caf5a0010340e9fdf1d1547375ff5a6aec59bc053781b0ef6cce8b6b7fbb49 Content-Type: application/json { "page": 1, "row": 1 }
count表示符合该条件的实例总共有多少条。
{ "status": 2000, "message": "success", "data": { "count": 4, "data": [ { "userAccount": "z8z87878", "remoteId": "4f5b978e-5631-4dd1-8b1f-a38f202bbadd", "productId": "cvm.g1.c1m1.large", "projectId": "0", "projectName": "默认", "latestOrderId": "1706449695652184065", "cpuNum": 1, "memSize": 1024, "systemDiskInfo": "{\"remoteId\":\"9076ee10-2d39-4c23-be59-8fe1a7e5072d\",\"productId\":\"standard_cloud_disk\",\"productName\":\"高效云盘\",\"diskSize\":20,\"status\":\"OK\",\"remoteHostName\":\"computer2\",\"id\":\"disk-3hdk8be2b2222\"}", "areaMark": "test", "areaName": "测试环境", "hostType": "g1", "hostTypeName": "通用型", "floatIpId": "54a49d4b-a126-4895-bca2-d8548fbfc46b", "floatIp": "192.168.34.243", "innerIp": "172.16.1.27", "bandwidthStatus": "OK", "bandwidthProductId": "default", "bandwidthTypeName": "默认", "bandwidth": 1, "imageId": "CentOS-6-x86_64-6.8", "imageName": "CentOS 6.8 64位", "imageType": "public", "securityGroupStatus": "ok", "securityGroupInfo": "guiyun-system-template-open-all", "beginTime": 1589188908832, "endTime": 1594459308832, "status": "OK", "remoteHostStatus": "ACTIVE", "buildStatus": "build_success", "remoteHostName": "computer2", "autoRenew": false, "supportNoReasonRefund": false, "refundStatus": "NONE", "configuration": "", "createTime": 1589188908833, "updateTime": 1589255127596, "id": "cvm-3hdk8be2b2225" } ] } }
实例数据结构:
字段 | 类型 | 描述 |
id | string | 实例id |
userAccount | string | 用户名 |
projectId | string | 实例所属项目id 0为默认项目 |
projectName | string | 实例项目名 |
systemDiskInfo | string | json字符串,系统盘信息 |
bindDiskCount | int | 绑定续费的磁盘数量 |
hasBoot | boolean | true为有系统盘,false为没有 |
status | string | 实例状态 |
remoteHostStatus | string | 实例运行状态 |
buildStatus | int | 实例创建状态 |
bandwidthStatus | string | 带宽设置状态 |
securityGroupStatus | string | 安全组设置状态 |
endTime | long | 到期时间时间戳,精确到毫秒 |
createTime | long | 创建时间时间戳,精确到毫秒 |
您对该文档有什么建议?
本文导航