最新活动 七周年庆典

产品

硅云帮助文档中心

搜索文档

热门搜索词:

搜索实例

更新时间:2020-07-14 14:32  版本:v1.2
分享到:
我要反馈 
收藏 我的收藏

简要描述:


    搜索实例


请求url:


/ncs-server/api/v1/host/search


请求方式:


GET


请求参数:


字段
类型最大长度参数位置默认选填
描述
page int10RequestBody
页,默认1 第一页
rowint10RequestBody
默认10  一页10行,最大 100
ipstring
RequestBody
公网ip地址
statusstring16RequestBody
实例状态
projectIdstring32RequestBody
项目id
areaMarkstring32RequestBody
地区标识
securityGroupIdstring32RequestBody
安全组id
autoRenewboolean1RequestBody
是否开启了自动续费,true为已开启
idstring32RequestBody
实例Id,模糊查询,精确查询请通过根据实例id获取实例接口
fromCreateTimelong64RequestBody
创建时间时间戳左区间,精确到毫秒
toCreateTimelong64RequestBody
创建时间时间戳右区间,精确到毫秒
fromEndTimelong64RequestBody
过期时间时间戳左区间,精确到毫秒
toEndTimelong64RequestBody
过期时间时间戳右区间,精确到毫秒



请求示例:


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"
            }
        ]
    }
}


实例数据结构:


字段类型
描述
idstring实例id
userAccount
string用户名
projectId
string实例所属项目id  0为默认项目
projectNamestring实例项目名
systemDiskInfostringjson字符串,系统盘信息
bindDiskCountint绑定续费的磁盘数量
hasBootbooleantrue为有系统盘,false为没有
status
string实例状态
remoteHostStatusstring实例运行状态
buildStatusint实例创建状态
bandwidthStatus
string带宽设置状态
securityGroupStatusstring安全组设置状态
endTimelong到期时间时间戳,精确到毫秒
createTimelong创建时间时间戳,精确到毫秒










您对该文档有什么建议?

您对该文档的评分:

本文导航

简要描述:

请求url:

请求方式:

请求参数:

请求示例:

返回示例:

搜索文档