查询子设备(小度)
HTTP方法
POST
HTTP URL
/v1/device/xiaodu/sub/get
Header参数
- Content-Type采用 application/json
- 认证相关头字段,请参考wsse认证
Body数据
参数 | 类型 | 必需 | 描述 |
---|---|---|---|
deviceId | string | 是 | 小度设备Id |
请求示例
{
"deviceId": "861107053769700"
}
HTTP响应
参数 | 类型 | 描述 |
---|---|---|
code | int | 状态码,0为成功,非0为失败 |
message | string | 对于状态码的简单描述 |
data | list | 对于状态码的简单描述 |
data
参数 | 类型 | 描述 |
---|---|---|
online | string | 在线状态 |
deviceType | string | 设备类型 |
deviceManufacturer | string | 设备厂商 |
deviceId | string | 设备id |
deviceName | string | 设备名称 |
正常响应
{
"code": 0,
"message": "Success",
"data": [
{
"online": "0",
"deviceType": "7",
"deviceManufacturer": "24",
"deviceId": "f421ae5ee1a2",
"deviceName": "红外传感器"
},
{
"online": "0",
"deviceType": "6",
"deviceManufacturer": "24",
"deviceId": "f421ae5ed5b6",
"deviceName": "门磁传感器"
},
{
"online": "0",
"deviceType": "4",
"deviceManufacturer": "24",
"deviceId": "",
"deviceName": "水浸探测器"
},
{
"online": "0",
"deviceType": "8",
"deviceManufacturer": "24",
"deviceId": "f421aeaff1ab",
"deviceName": "烟感探测器"
},
{
"online": "0",
"deviceType": "5",
"deviceManufacturer": "24",
"deviceId": "b85cee2c67f9",
"deviceName": "无线呼叫器"
},
{
"online": "0",
"deviceType": "3",
"deviceManufacturer": "24",
"deviceId": "f421aeb000cf",
"deviceName": "燃气探测器"
},
{
"online": "0",
"deviceType": "3",
"deviceManufacturer": "24",
"deviceId": "f421aeb008e3",
"deviceName": "燃气探测器"
}
],
"traceId": "1da45e68f95d45ba1648199270697787392x"
}
小度没有子设备
{
"code": 0,
"message": "Success",
"data": [],
"traceId": "1da45e68f95d45ba1650387204666548224x"
}
异常响应
设备id不能为空
{
"code": 9000,
"message": "设备ID不能为空",
"traceId": "1da45e68f95d45ba1650385080318681088x"
}
设备id不在系统中
{
"code": 313079,
"message": "设备id不在系统中",
"traceId": "1da45e68f95d45ba1650388280694267904x"
}