4.3.1 获取设备列表
接口说明:
名称 | 内容 |
---|---|
URL | https://xxx/tums/deviceManager/v1/getDeviceList |
功能说明 | 获取当前项目的某种设备 |
使用限制 | 用户有当前项目的查看权限时可用 |
请求参数:
参数名称 | 参数描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
start long |
要获取的起始条目 限制:必选参数 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit int |
要获取的条目总数 限制:必选参数,[1, 100] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filterAnd Map |
获取的数据要同时匹配filterAnd中的数据 可以与filterOr一起使用,表示满足filterAnd中的所有条件同时满足one of其中之一条件 限制: 1.必选参数; 2.包含一组key/value,key必须是如下的参数之一,必须包括必选参数:
4.所有匹配均为准确匹配 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filterOr Map |
获取的数据要符合one of其中之一 可以与filterAnd一起使用,表示满足filterAnd中的所有条件同时满足one of其中之一条件 限制: 1.可选参数; 2.包含一组key/value,key必须是如下的参数之一:
4.所有匹配均为模糊匹配 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sort List |
表示返回数据的排序方式,数组第一个元素是第一优先级,依次降低 限制: 1.可选参数; 2.包含一组key/value,key必须是如下的参数之一:
4.value为asc/desc,分别表升序和降序 |
返回参数:
参数名称 | 参数描述 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
result | total int | 满足条件的设备总个数 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| list List<Object> | 设备信息列表,具体字段有:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
error_code int | 返回码,0 – 成功,其他- 失败,具体请参考返回码章节 |
代码示例
https://xxx/tums/deviceManager/v1/getDeviceList request: { "start": 1, "limit": 20, "filterAnd": { "deviceCatagory": "video", "projectId": "5", "deviceStatus": 1, "ipFloor": "192.168.1.100", }, "filterOr": { "deviceName": "135", "deviceType": "135", "ip": "135" } "sort": [ { "deviceType": "asc" } ] } response: { "result": { "total": 2, "list": [{ "devId": "32", "deviceName": "第一台IPC", "deviceStatus": 1, "deviceType": "IPC", "deviceModel": "TL-IPC42EW-4", "ip": "192.168.1.193", "ethernet": "CC-08-FB-E7-62-DA", "ipcNum": 0, "editable": false }, { "devId": "18", "deviceName": "第三台NVR", "deviceStatus": 1, "deviceType": "NVR", "deviceModel": "TL-IPC42EW-4", "ip": "192.168.1.193", "ethernet": "CC-08-FB-E7-62-DA", "ipcNum": 0, "expand": [{ "devId": "18", "deviceName": "24栋第五台IPC", "ip": "192.168.1.7" }] "editable": false }, ] }, "error_code": 0 }