A Sensor Alerts webhook object contains the following fields:
Attribute | Type | Description |
---|---|---|
webhook_type | String | sensor_alert |
webhook_id | String | The unique identifier of the webhook. |
org_id | String | The unique identifier of the organization. |
created_at | Integer | The creation time of the webhook. Formatted as a Unix timestamp in seconds. |
data | Object | The data associated with the notification. See the following attribute for sub-fields. |
data.alert_event_id | String | The unique identifier of the alert. |
data.start_time | Double | The start time of the alert. Formatted as a Unix timestamp in seconds. |
data.end_time | Double | The end time of the alert. Formatted as a Unix timestamp in seconds. |
data.most_extreme_value | Double | The most extreme value for the sensor that was detected during the alert window. |
data.is_above_max_event | Boolean | If the alert can be configured with a low/high threshold, this value will be true if the value that triggered the alert was above the high threshold. This only applies to temperature and humidity alerts. |
data.threshold | Double | User-defined threshold of the alert. |
data.reading | String | The sensor type of the alert. |
data.device_id | String | The unique identifier of the device that generated the alert. |
data.device_name | String | The name of the device that generated the alert. |
data.device_serial | String | The serial number of the device that generated the alert. |
Sample Sensor Webhook Object
{
org_id: '3c85f39b-0d3d-4288-9c7e-cdec0b5b4ac5',
webhook_type: 'sensor_alert',
created_at: 1641230332,
webhook_id: 'bafdfe28-abcc-478c-a5cc-b465e293bc43',
data: {
alert_event_id: 'e006ef1c-e039-43e0-88f5-093b17ccc2dc',
start_time: 1641230330.845883,
end_time: null,
most_extreme_value: 38.725012367437245,
is_above_max_event: true,
threshold: 35,
reading: 'calibrated_temperature',
device_id: 'e637120c-09bb-4601-a8bf-dcf54d46aece',
device_name: "Lobby Sensor",
device_serial: 'JQ9E-R9CG-RF6X'
}
}