Hello,
We are going through the documentation of Cumulocity REST API, but cannot find information on how to create circular Geofence (with radius defined) and also to create alarm on Boundary exit.
We somehow managed to find out how to create polygon Geofence with
POST /service/smartrule/managedObjects/{{managedObjectId}}/smartrules
{
"type": "c8y_PrivateSmartRule",
"name": "Test",
"enabled": true,
"config": {
"geofence": [
{
"lat": 44.84135569856291,
"lng": 20.41612207889557
},
{
"lat": 44.84213925640641,
"lng": 20.417162775993344
},
{
"lat": 44.84126440957738,
"lng": 20.417720675468445
},
{
"lat": 44.84109704606153,
"lng": 20.41633665561676
}
],
"triggerAlarmOn": "both",
"alarmType": "c8y_GeofenceAlarm",
"alarmSeverity": "CRITICAL",
"alarmText": "Geofence"
},
"c8y_Context": {
"context": "device",
"id": "1111"
},
"ruleTemplateName": "onGeofenceCreateAlarm",
"enabledSources": [
"1111"
]
}
Can you assist with any examples?
Kind regards,
Miloš