Response ‒ Rules/Post
All the same properties in the request are returned in the response. The response that is returned also contains the following properties –
Property | Type | Description |
---|
id | String | A unique identifier that is automatically generated for this Rule by IoT Platform . |
conditions/id | String | A unique identifier of each Condition defined in the Rules/Post Request is generated by IoT Platform . |
actions/id | String | A unique identifier of each Action defined in the Rules/Post Request is generated by IoT Platform . |
createDate, createUser, updateDate, updateUser | | See Common Response Properties. |
Example JSON Rules/Post Response
Status 201 – Created
{
“@odata.context”: “https://dev-axonizeapi-axonize.dev-ase-axonize.p.azurewebsites.net/odata/$metadata#Rules/$entity”,
“name”: “BasicRule”,
“description”: “”,
“active”: true,
“severity”: “Warning”,
“cronSchedule”: null,
“type”: “Conditional”,
“timezone”: “Asia/Jerusalem”,
“category”: null,
“level”: “ByApp”,
“automaticallyDismiss”: false,
“notifyOnRestore”: false,
“tenantId”: “5883b7cb922dd1139c1d15ce”,
“id”: “5b547a4e19ec0c05707d1220”,
“appId”: “1aaf017c-b987-4f53-94d6-ad9afb8e4767”,
“createDate”: “2018-07-22T12:36:30.8357086Z”,
“createUser”: “5b0d033821b5bc289491564d”,
“updateDate”: “0001-01-01T00:00:00Z”,
“updateUser”: null,
“actions”: [
{
“id”: “5b547a4e19ec0c05707d121d”,
“type”: “AlarmInstance”,
“emailProperties”: null,
“smsProperties”: null,
“phoneCallProperties”: null,
“alarmInstanceProperties”: null,
“eventLogEntryProperties”: null,
“commandProperties”: null,
“webServiceProperties”: null,
“ruleRecurrenceSettings”: null,
“additionalPropertyProperties”: null
},
{
“id”: “5b547a4e19ec0c05707d121e”,
“type”: “EventLogEntry”,
“emailProperties”: null,
“smsProperties”: null,
“phoneCallProperties”: null,
“alarmInstanceProperties”: null,
“eventLogEntryProperties”: {
“message”: “{severity} alarm from {deviceName} – {triggeringEvent} {operator} {threshold} on value {value}”
},
“commandProperties”: null,
“webServiceProperties”: null,
“ruleRecurrenceSettings”: null,
“additionalPropertyProperties”: null
}
],
“restoreActions”: [],
“schedule”: null,
“weeklySchedule”: {
“sun”: {
“active”: true,
“timeRange”: null
},
“mon”: {
“active”: true,
“timeRange”: null
},
“tue”: {
“active”: true,
“timeRange”: null
},
“wed”: {
“active”: true,
“timeRange”: null
},
“thu”: {
“active”: true,
“timeRange”: null
},
“fri”: {
“active”: true,
“timeRange”: null
},
“sat”: {
“active”: true,
“timeRange”: null
}
},
“conditions”: [
{
“id”: “5b547a4e19ec0c05707d121f”,
“appIdForRule”: null,
“productId”: null,
“eventName”: “Soil Humidity”,
“typeCode”: 1039,
“threshold”: “10”,
“operator”: “<“,
“durationInMinutes”: 0,
“conditionCount”: 0,
“isRelative”: false,
“type”: “Threshold”,
“name”: “ConditionName”,
“ruleTarget”: “Device Level Rule”,
“targetId”: “Axonize.Common.Models.NonSql.DeviceNode”,
“eventProductId”: “58845d33922dcf2b0cc4632a”,
“devices”: [
{
“id”: “5ab1200721b5bb23b84fa126”,
“name”: “qsdas1j”
}
],
“locationConditionSettings”: null
}
],
“ruleRecurrenceSettings”: null
}
},