## 接口调用请求说明:
http请求方式:GET
请求URL:https://edroom.rolink-power.com/api/web/rocoi/deviceLists
## header参数说明
| 参数 | 是否必须 |说明|
| --- | --- |--- |
| Ly-Api-Version|是 |接口版本号,固定为:1.0|
|Ly-Token|是|数据获取凭证|
|Ly-Device-Type|是|设备类型,固定为:pc|
## 返回说明
正常情况下,系统会返回下述JSON数据包:
```
{
"code": 1,
"msg": "数据获取成功",
"data": [{
"dev_name": "洛联车间电能表3",
"rmu_id": "102021070000",
"product_key": "CKjag7",
"status": 1,
"devlists": [{
"rmu_id": "102021070000",
"dev_id": "012021070100",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021070000",
"dev_id": "012021070200",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021070000",
"dev_id": "012021070300",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021070000",
"dev_id": "012021070400",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021070000",
"dev_id": "012021070500",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021070000",
"dev_id": "012021070600",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}]
}, {
"dev_name": "洛联车间电能表1",
"rmu_id": "102021010000",
"product_key": "CKjag7",
"status": 1,
"devlists": [{
"rmu_id": "102021010000",
"dev_id": "012021010100",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010200",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010300",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010400",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010500",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010600",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010700",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021010000",
"dev_id": "012021010800",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}]
}, {
"dev_name": "洛联车间电能表",
"rmu_id": "102021020000",
"product_key": "CKjag7",
"status": 1,
"devlists": [{
"rmu_id": "102021020000",
"dev_id": "012021020100",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021020000",
"dev_id": "012021020200",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021020000",
"dev_id": "012021020300",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021020000",
"dev_id": "012021020400",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021020000",
"dev_id": "012021020500",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}, {
"rmu_id": "102021020000",
"dev_id": "012021020700",
"CUM_FAULT": 0,
"MECH_FAULT": 0,
"inspect": 0,
"dev_name": "电能表",
"dev_type": "ele"
}]
}]
}
```
## 参数说明
| 参数 | 说明 |
| --- | --- |
| code | 返回码 1-成功 0-失败 |
|msg|返回消息说明|
|data|返回数据|
## data结构体说明
| 参数 | 说明 |
| --- | --- |
| dev_name| 网关名称 |
|rmu_id|网关编码|
|product_key|产品KEY|
|status|设备状态 1-在线 2-离线 3-故障|
|devlists|设备列表|
## devlists结构体说明
| 参数 | 说明 |
| --- | --- |
| rmu_id| 网关编码 |
|dev_id|设备编码|
|CUM_FAULT|通信状态 0-正常 1-故障|
|MECH_FAULT|故障状态 0-正常 1-故障|
|inspect|巡检状态 0-正常 1-故障|
|dev_name|设备名称|
|dev_type|设备类型码|
## 调用示例
![](https://img.kancloud.cn/83/51/8351b462e9121da96c3ca055963e3398_1403x769.png)