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