Request ‒ AlarmInstances/Post
Property
Type
Description
Mandatory
deviceId
String
The unique identifier of the Device on which the AlarmInstance occurred.
Y
typeCode
Integer
The typeCode of the event that triggered the AlarmInstance. See Defining a Device Event Manifest for more information.
Y
value
String
The value of the Event that triggered the AlarmInstance.
Y
readingDateTime
DateTime
The timestamp of the Event (reading) that triggered the Alarm.
readingDateTimeOffset
DateTimeOffset
Same as readingDateTime with a different date structure.
Y
ruleId
String
The unique identifier of the Rule that created this AlarmInstance when its conditions were met.
Y
eventName
String
The name of the Event that triggered the Alarm.
severity
String/Enum
The severity defined by the Rule:
Warning
Minor
Major
Critical
Y
status
String/Enum
The status of the AlarmInstance:
Open
Closed
After an AlarmInstance is triggered by a Rule, its status is Open (0). An AlarmInstance can then be Closed (1) in the IoT Platform Portal or through the API.
Y
snoozeExpirationDate
DateTime
Until this date has passed, the Rule does not send repeat notifications.
This initial recurrence is described in the Rule in the actions/ruleRecurrenceSettings/repeatFrequency property.
message
String
A free-text message describing what occurred. For example, Temperature Is Too High.
appId
String
A unique Application identifier that is automatically generated by IoT Platform . This is the identifier of the Application to which this AlarmInstance is assigned.
This identifier is automatically generated by IoT Platform when the Applications/Post request is used.
Y
Example JSON AlarmInstances/Post Request
curl -X POST \
https://api.stg.axonize.com/odata/alarminstances \
-H ‘Cache-Control: no-cache’ \
-H ‘Authorization: Token’ \
-H ‘Content-Type: application/json’ \
-H ‘appId: 801A048A-9F23-429F-BF0D-B6D35B212345’ \
-d ‘{
“deviceId”: “5b06684c21b5bc27d4412345”,
“typeCode”: 7,
“value”: “10”,
“readingDateTime”: “2018-06-21T15:04:36.70395Z”,
“readingDateTimeOffset”: “2018-06-21T15:04:36.70395+00:00”,
“ruleId”: “5b2bb87e21b5c318fc743fd0”,
“eventName”: “Temperature”,
“severity”: “Warning”,
“status”: “Open”,
“message”: “msg_default_alarmInstance_message”,
“appId”: “1aaf017c-b987-4f53-94d6-ad9af4fd2767”
}’