Geofences
Basic queries
Get a list of geofences
Query:
GET /api/v1/geofences
Answer:
Array of all geofences in the project
Get information about one geofence
Query:
GET /api/v1/geofences/:id
Answer:
JSON representation of a geofence
Create a new geofence
In the body of the request to create a new geofence, specify its representation in JSON format. JSON format.
Required fields:
- name - name of the new geofence.
Change geofence
In the body of the request to modify an existing geofence, specify the fields you want to update. you want to update.
Request:
PATCH /api/v1/geofences/:id
{
"color": "#fc0fc0"
}
** Answer:**
JSON representation of a geofence including modified fields
Delete geofence
Query:
DELETE /api/v1/geofences/:id
Answer:
JSON representation of a remote geofence
Adding geofences to an object
Important: In requests :id is the identifier of the object to which you want to add a geofence, :geofence is the identifier of the geofence to be added. to add a geofence, :geofence is the identifier of the geofence to be added.
Add geofence to an object
Request:
POST /api/v1/objects/:id/geofences/:geofence/start
Answer:
Information about the status of the request execution
Delete geofence from object
Request:
POST /api/v1/objects/:id/geofences/:geofence/stop
Answer:
Information about the status of the request execution