Last Updated on : 2023-06-20 14:52:23download
Create a circular geofence. The binding types include private geofences and public geofences. A private geofence is used to monitor a single object, and up to 100 private geofences can be created for an object. The total number of private geofences under an account is unlimited.
A public geofence can be used to monitor multiple objects, and up to 1,000 public geofences can be created for an account.
POST: /v2.0/iot-01/fences/circle
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
tag | String | false | The custom dimension tag to classify the geofences. The geofences can be filtered by the dimension tags. | |
fence_name | String | true | The name of the geofence. | |
bind_type | Integer | true | Indicates the binding type of the geofence. Valid values:
|
|
entity_id | String | false | The ID of a monitored object. The field is required when it is a private geofence, and the field is invalid for a public geofence. | |
radius | Integer | true | The radius of a geofence. Unit: meters. Valid values: (0,5000]. | |
lon | Double | true | The longitude of a geofence center point. | |
lat | Double | true | The latitude of a geofence center point. | |
coord_type | String | true | Indicates the type of the longitude and latitude positioning coordinate system. Valid values:
|
|
warn_rule | Integer | true | Indicates the alert rules. Valid values:
|
Parameter name | Type | Description |
---|---|---|
result | FenceIdRes |
Description of result
Parameter name | Type | Description |
---|---|---|
fence_id | Long | The geofence ID. |
POST: /v2.0/iot-01/fences/circle
{
"tag": "family",
"fence_name": "Public Geofence",
"bind_type": 1,
"entity_id": "vdevo16245017293****",
"radius": 200,
"lon": "31.218093093844786",
"lat": "121.36040929664465",
"coord_type": "WGS84",
"warn_rule": 1
}
{
"result": {
"fence_id": 51000
},
"t": 1625210821631,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback