更新时间:2023-06-15 04:58:25
本文介绍查询围栏告警的 API。
分页查询围栏告警。
GET: /v2.0/iot-01/fences/warn/list
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| tag | String | query | false | 维度标签,支持通过自定义维度标记对电子围栏进行分类;查询电子围栏时,支持通过维度标记筛选 |
| fence_id | Long | query | false | 围栏 ID |
| entity_id | String | query | false | 监控对象 ID,目前为设备 ID |
| bind_type | Integer | query | false | 围栏绑定类型:
|
| warn_type | Integer | query | false | 告警类型:
|
| start_time | Long | query | false | 开始时间 13 位毫秒时间戳 |
| end_time | Long | query | false | 结束时间 13 位毫秒时间戳 |
| page_index | Integer | query | false | 分页索引,默认值为 1 |
| page_size | Integer | query | false | 分页大小,默认值为 200 |
| last_row_key | Long | query | false | 上一页最后一个告警 ID,分页时候: page_index 与 last_id 方式二选一。last_id 只支持下一页,查询速度快,查询第一页不传;page_index 支持跳页,查询数据量大的时候查询速度慢。 |
| coord_type | String | query | false | 经纬度定位坐标系类型:
|
| 参数名 | 类型 | 说明 |
|---|---|---|
| result | PageRes |
result 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| data | List |
当前页数据列表 |
| total | Long | 总的查询结果数量 |
| last_row_key | Long | 当前页最后一个数据的自增 ID |
| last_page | Boolean | 是否最后一页,true:是; false:否 |
data 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| id | Long | 告警记录 ID |
| fence_id | Long | 围栏 ID |
| entity_id | String | 触发实体 ID |
| fence_name | String | 围栏名称 |
| bind_type | Integer | 围栏绑定类型:
|
| warn_type | Integer | 告警类型 :
|
| lon | Double | 上报经度 |
| lat | Double | 上报纬度 |
| report_time | Long | 上报时间 |
| gmt_create | Long | 创建时间 |
GET: /v2.0/iot-01/fences/warn/list?tag=ceshi&fence_id=1000&entity_id&bind_type&warn_type&start_time&end_time&page_index&page_size&last_row_key
{
"result": {
"last_row_key": 1000,
"data": [
{
"gmt_create": 1626059445000,
"lon": 20.01,
"entity_id": "vdevo16245017293****",
"fence_id": 1000,
"fence_name": "第一个围栏",
"bind_type": 1,
"report_time": 1626059445000,
"id": 1000,
"warn_type": 1,
"lat": 121.09
}
],
"last_page": true,
"total": 1
},
"t": 1625231333342,
"success": true
}
参考 错误码。
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈