Last Updated on : 2023-06-15 04:58:26
Query the geofence alerts on pages.
GET: /v2.0/iot-01/fences/warn/list
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| tag | String | query | false | The custom dimension tag to classify the geofences. The geofences can be filtered by the dimension tags. |
| fence_id | Long | query | false | The geofence ID. |
| entity_id | String | query | false | The ID of the monitored object. It is also the device ID. |
| bind_type | Integer | query | false | Indicates the binding type of the geofence. Valid values:
|
| warn_type | Integer | query | false | Indicates the alert rules. Valid values:
|
| start_time | Long | query | false | The 13-bit timestamp of the start time. Unit: milliseconds. |
| end_time | Long | query | false | The 13-bit timestamp of the end time. Unit: milliseconds. |
| page_index | Integer | query | false | The page index. Default value: 1. |
| page_size | Integer | query | false | The number of items returned on each page. Default value: 200. |
| last_row_key | Long | query | false | The alert ID of the last item on the last page. Choose page_index or last_id. last_id: Query only the next page at a high speed. The value is not returned if the first page is queried. page_index: Query the specified page. The speed is low in case of querying huge data. |
| coord_type | String | query | false | Indicates the type of longitude and latitude positioning coordinate system. Valid values:
|
| Parameter name | Type | Description |
|---|---|---|
| result | PageRes |
Description of result
| Parameter name | Type | Description |
|---|---|---|
| data | List |
The list of entries on the current page. |
| total | Long | The total number of items. |
| last_row_key | Long | The row key of the last item on the current page. |
| last_page | Boolean | Indicates whether it is the last page. Valid values: true: yes. false: no. |
Description of data
| Parameter name | Type | Description |
|---|---|---|
| id | Long | The ID of an alert. |
| fence_id | Long | The geofence ID. |
| entity_id | String | The ID of an entity that triggers an alert. |
| fence_name | String | The name of the geofence. |
| bind_type | Integer | Indicates the binding type of the geofence. Valid values:
|
| warn_type | Integer | Indicates the alert rules. Valid values:
|
| lon | Double | The longitude reported by an alert. |
| lat | Double | The latitude reported by an alert. |
| report_time | Long | The time when an alert is reported. |
| gmt_create | Long | The time when it is created. |
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": "The First Geofence",
"bind_type": 1,
"report_time": 1626059445000,
"id": 1000,
"warn_type": 1,
"lat": 121.09
}
],
"last_page": true,
"total": 1
},
"t": 1625231333342,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback