Modify Circular Geofence

Last Updated on : 2023-06-20 14:52:23download

Modify the data of a circular geofence by geofence ID.

API address

PUT: /v2.0/iot-01/fences/circle/{fence_id}

Request parameter

Parameter name Type IN Required Description
fence_id Long uri true The geofence ID.

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 false The name of the 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:
  • WGS84: Google Coordinate System.
  • GCJ02: AutoNavi.
  • BD09LL: Baidu.
warn_rule Integer false Indicates the alert rules. Valid values:
  • 1: triggers an alert when someone enters the geofence.
  • 2: triggers an alert when someone exits the geofence.
  • 3: triggers an alert when someone enters or exits the geofence.

Return parameter

Parameter name Type Description
result Boolean Indicates whether the operation is successful.

Request example

PUT: /v2.0/iot-01/fences/circle/44009
{ "fence_name": "The First Geofence", "radius": 300, "lon": "31.2180", "lat": "121.3604", "coord_type": "WGS84", "warn_rule": 1 }

Return example

{ "result": true, "t": 1625211991720, "success": true }

Error code

For more information, see error code.