批量查询设备状态
请求方式:GET
URL: http(s)://api.heclouds.com/devices/status
我只想看示例!!!
url参数
参数名称 | 格式 | 是否必须 | 说明 |
devIds | string | 是 | 设备id,多个设备id用逗号隔开,限制1000个设备 |
返回参数
参数名称 | 格式 | 说明 |
errno | int | 调用错误码,为0表示调用成功 |
error | string | 错误描述,为"succ"表示调用成功 |
data | json | 接口调用成功之后返回的设备相关信息,见data描述表 |
data描述表
参数名称 | 格式 | 说明 |
total_count | int | 总数 |
devices | array-json | 设备状态的json数组,见devices描述表 |
devices描述表
参数名称 | 格式 | 说明 |
id | string | 设备id |
title | string | 设备名称 |
online | bool | 在线状态 |
请求示例
GET http://api.heclouds.com/devices/status?devIds=1221,12233,1123 HTTP/1.1
api-key: WhI*************v1c=
Content-Type: application/json
返回示例
{
"errno": 0,
"data": {
"total_count":121,
"devices":[
{
"id":1221,
"title":"device1",
"online":false
},
{
"id":12333,
"title":"device2",
"online":true
},
...
]
},
"error": "succ"
}