Alert format
Purpose
This page describes the structure and format of data sent through the Notifications API by Geofencing.
Transition
Data format
1{2 "title": "${ALERT_RULE_NAME} - ${ALERT_RULE_UUID}",3 "body": "'${OBJECT_NAME}' exited '${FENCE_NAME}' on ${DATE} at ${TIME} (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "uuid_string",7 "alertName": "name_of_the_alert",8 "projectId": "uuid_string",9 "projectName": "name_of_the_project",10 "fenceId": "uuid_string",11 "fenceName": "name_of_the_fence",12 "objectId": "uuid_string",13 "objectName": "name_of_the_object",14 "transitionType": "name_of_the_transition",15 "estimatedTransitionPositionLongitude": double,16 "estimatedTransitionPositionLatitude": double,17 "estimatedTransitionTime": "ISO 8601"18 }19}
Data fields
The following table describes the fields that are used in a request body.
Primary fields | |
---|---|
Field | Description |
| The title of the message.
|
| The body of the message.
|
| Contains additional information about a triggered Transition Alert. |
contextData object | |
Field | Description |
| The type of the event. |
| The UUID of the project. |
| The name of the project. |
| The UUID of the fence. |
| The name of the fence. |
| The UUID of the object. |
| The name of the object. |
| The type of the Transition to Alert.
|
| Estimated longitude value of the transition position. |
| Estimated latitude value of the transition position. |
| Estimated transition time as a timestamp (ISO 8601 format). |
Examples
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' entered 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "ENTER",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:21"18 }19}
1{2 "title": "Forbidden Area for Drone - 1bc87594-f3da-4031-8786-01a04d145665",3 "body": "'Drone' exited 'Forbidden Area' on 2021-01-20 at 14:23:21 (UTC).",4 "contextData": {5 "eventType": "TRANSITION",6 "alertId": "1bc87594-f3da-4031-8786-01a04d145665",7 "alertName": "Forbidden Area for Drone",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "aa7ace6b-cf04-40fa-8b8f-c98c37a27613",11 "fenceName": "Forbidden Area",12 "objectId": "5d631d54-793d-48f1-961f-17949ba6bf6d",13 "objectName": "Drone",14 "transitionType": "EXIT",15 "estimatedTransitionPositionLongitude": 18.2,16 "estimatedTransitionPositionLatitude": 51.9,17 "estimatedTransitionTime": "2021-01-20T14:23:41"18 }19}
Dwell
Data format
1{2 "title": "${ALERT_RULE_NAME} - ${ALERT_RULE_UUID}",3 "body": "On ${DATE} at ${TIME} (UTC) '${OBJECT_NAME}' stayed in '${FENCE_NAME}' ${HOURS} hour(s) ${MINUTES} minute(s) ${SECONDS} second(s) over the limit of ${DWELL_LIMIT_SECONDS} second(s).",4 "contextData": {5 "eventType": "DWELL",6 "alertId": "uuid_string",7 "alertName": "name_of_the_alert",8 "projectId": "uuid_string",9 "projectName": "name_of_the_project",10 "fenceId": "uuid_string",11 "fenceName": "name_of_the_fence",12 "objectId": "uuid_string",13 "objectName": "name_of_the_object",14 "estimatedDwellTime": integer,15 }16}
Data fields
The following table describes the fields that are used in a request body.
Primary fields | |
---|---|
Field | Description |
| The title of the message.
|
| The body of the message.
|
| Contains additional information about a triggered Transition Alert. |
contextData object | |
Field | Description |
| The type of the event. |
| The UUID of the project. |
| The name of the project. |
| The UUID of the fence. |
| The name of the fence. |
| The UUID of the object. |
| The name of the object. |
| Estimated dwell time of an Object in a Fence. |
Example
1{2 "title": "Forbidden Area for Car - 41a52ea0-259b-4cca-9028-f64525469774",3 "body": "On 2021-01-21 at 07:34:50 (UTC) 'Car' stayed in 'Forbidden Car Area' 16 hour(s) 42 minute(s) 44 second(s) over the limit of 1 second(s)",4 "contextData": {5 "eventType": "DWELL",6 "alertId": "41a52ea0-259b-4cca-9028-f64525469774",7 "alertName": "Forbidden Area for Car",8 "projectId": "d0d65b63-1121-432c-a034-960540df98fa",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "3b895abb-bd54-4f02-bc4e-59e809f0fc3d",11 "fenceName": "Forbidden Car Area",12 "objectId": "fd6f935f-00d4-4650-b540-de9d674ffb70",13 "objectName": "Car",14 "estimatedDwellTime": 6012115 }16}
Object Count
Data format
1{2 "title": "${ALERT_RULE_NAME} - ${ALERT_RULE_UUID}",3 "body": "The maximum number of objects was exceeded (number of objects:${OBJECT_COUNT}, limit:${OBJECT_COUNT_LIMIT}) in the fence '${FENCE_NAME}' ('${FENCE_ID}') on ${DATE} at ${TIME} (UTC).",4 "contextData": {5 "eventType": "OBJECT_COUNT",6 "alertId": "uuid_string",7 "alertName": "name_of_the_alert",8 "projectId": "uuid_string",9 "projectName": "name_of_the_project",10 "fenceId": "uuid_string",11 "fenceName": "name_of_the_fence",12 "objectCount": integer,13 "maxObjectCount": integer,14 "estimatedEventTime": integer15 }16}
Data fields
The following table describes the fields that are used in a request body.
Primary fields | |
---|---|
Field | Description |
| The title of the message.
|
| The body of the message.
|
| Contains additional information about a triggered Transition Alert. |
contextData object | |
Field | Description |
| The type of the event. |
| The UUID of the project. |
| The name of the project. |
| The UUID of the fence. |
| The name of the fence. |
| Number of Objects in a Fence. |
| Maximum number of Objects that could be present in a Fence all at once before an Alert was raised. |
| Estimated event time as a timestamp (ISO 8601 format). |
Example
1{2 "title": "Maximum allowed objects inside - 8348f466-3cc2-423b-a34a-0273bd5f7294",3 "body": "The maximum number of objects was exceeded (number of objects:1, limit:0) in the fence 'Car Park' ('93fd020e-5abd-4613-938b-4ca7f1171499') on 2021-01-20 at 23:53:49 (UTC)",4 "contextData": {5 "eventType": "OBJECT_COUNT",6 "alertId": "8348f466-3cc2-423b-a34a-0273bd5f7294",7 "alertName": "Maximum allowed objects inside",8 "projectId": "7083d404-b6b2-4b7d-a876-e5f8aee6f842",9 "projectName": "Forbidden Areas for Drones",10 "fenceId": "93fd020e-5abd-4613-938b-4ca7f1171499",11 "fenceName": "Car Park",12 "objectCount": 1,13 "maxObjectCount": 0,14 "estimatedEventTime": "2021-01-20T23:53:49"15 }16}
Proximity
Data format
1{2 "title": "${ALERT_RULE_NAME} - ${ALERT_RULE_UUID}",3 "body": "'${OBJECT_NAME}' was within proximity distance of ${DISTANCE} meters (${DISTANCE} to fence '${FENCE_NAME}') on ${DATE} at ${TIME} (UTC).",4 "contextData": {5 "eventType": "PROXIMITY",6 "alertId": "uuid_string",7 "alertName": "name_of_the_alert",8 "projectId": "uuid_string",9 "projectName": "name_of_the_project",10 "fenceId": "uuid_string",11 "fenceName": "name_of_the_fence",12 "objectId": "uuid_string",13 "objectName": "name_of_the_object",14 "proximityDistance": double,15 "proximitySide": "proximity_side"16 }17}
Data fields
The following table describes the fields that are used in a request body.
Primary fields | |
---|---|
Field | Description |
| The title of the message.
|
| The body of the message.
|
| Contains additional information about a triggered Transition Alert. |
contextData object | |
Field | Description |
| The type of the event. |
| The UUID of the project. |
| The name of the project. |
| The UUID of the fence. |
| The name of the fence. |
| The UUID of the object. |
| The name of the object. |
| Distance from the fence within which the alarm was triggered. The value is expressed in meters. |
| Side of the fence in which the proximity will be measured.
This field exists for the |
Examples
Object is within the outside proximity area of the fence.
1{2 "title": "Proximity Area Alert - d8a7d15e-9ae6-49f3-9408-30b8ecbeecaf",3 "body": "'Drone' was within proximity distance of 50 meters (55.7 to fence 'Forbidden Area #1') on 2021-01-20 at 14:23:32 (UTC).",4 "contextData": {5 "eventType": "PROXIMITY",6 "alertId": "d8a7d15e-9ae6-49f3-9408-30b8ecbeecaf",7 "alertName": "Forbidden Area Alert",8 "projectId": "b9615d31-de4c-4f55-acfa-9684a2411811",9 "projectName": "Forbidden Areas",10 "fenceId": "f9b7f28c-d36a-4461-af15-7697d402e3d7",11 "fenceName": "Forbidden Area #1",12 "objectId": "2e5567eb-85bb-4722-900e-5fe83dbe0f19",13 "objectName": "Drone",14 "proximityDistance": 55.7,15 "proximitySide": "OUTSIDE"16 }17}
Object is within the inside proximity area of the fence.
1{2 "title": "Proximity Area Alert - d8a7d15e-9ae6-49f3-9408-30b8ecbeecaf",3 "body": "'Drone' was within proximity distance of 34 meters (34.8 to fence 'Forbidden Area #1') on 2021-01-20 at 14:23:42 (UTC).",4 "contextData": {5 "eventType": "PROXIMITY",6 "alertId": "d8a7d15e-9ae6-49f3-9408-30b8ecbeecaf",7 "alertName": "Forbidden Area Alert",8 "projectId": "b9615d31-de4c-4f55-acfa-9684a2411811",9 "projectName": "Forbidden Areas",10 "fenceId": "f9b7f28c-d36a-4461-af15-7697d402e3d7",11 "fenceName": "Forbidden Area #1",12 "objectId": "2e5567eb-85bb-4722-900e-5fe83dbe0f19",13 "objectName": "Drone",14 "proximityDistance": 34.8,15 "proximitySide": "INSIDE"16 }17}