getDpReportLog
获取 DP 点上报日志。
请求参数
参数 | 数据类型 | 说明 | 是否必填 |
---|---|---|---|
devId | String | 设备 ID | 是 |
dpIds | String | DP 点 ID,可以是多个 DP,用逗号隔开即可 | 是 |
offset | Integer | 查询返回结果时从指定序列后的结果开始返回 | 是 |
limit | Integer | 单页的最大值,offset + limit 要小于等于 4000 | 是 |
sortType | String | DESC 倒序 或者 ASC 顺序 | 否 |
返回结果
参数 | 数据类型 | 说明 |
---|---|---|
total | number | 总条数 |
dps | Dp[] | 见 Dp |
hasNext | boolean | 是否有下一页 |
请求示例
import { getDpReportLog } from '@ray-js/ray';
getDpReportLog({
devId: `${YOUR_DEVICE_ID}`,
dpIds: '20,30', // 多个DP
offset: 0,
limit: 3,
sortType: 'ASC',
})
.then((response) => {
console.log(response);
})
.catch();
返回示例
{
"dps": [
{
"dpId": 20,
"value": "false",
"timeStamp": 1621392860,
"timeStr": "2021-05-19 10:54:20"
},
{
"dpId": 20,
"value": "true",
"timeStamp": 1621392861,
"timeStr": "2021-05-19 10:54:21"
},
{
"dpId": 20,
"value": "false",
"timeStamp": 1621393756,
"timeStr": "2021-05-19 11:09:16"
}
],
"hasNext": true,
"total": 7,
"dpc": []
}
此页内容是否对您有帮助?
是
意见反馈