How can we help?

Searching:

0 results found

Rules/Get (Specific)

GET /odata/Rules/[id]

Description

Gets the details of a specific Rule, as specified by the Rule’s ID. This Rule ID is returned in the response of Rules/Post.

To get the details of all the Rules of an Application, see Rules/Get (List).

See the following for request and response details ‒

See Also

Request ‒ Rules/Get (Specific)

Property Type Description Mandatory
id String This is the unique identifier automatically assigned by Axonize when a Rule is created. This id is returned in the response of the Rules/Post. Y

Example JSON Rules/Get (Specific) Request

curl -X GET \

https://api.stg.axonize.com/odata/rules/5873c267fce97a28389d3aa1\

-H ‘Authorization: Token’ \

-H ‘Content-Type: application/json’ \

-H ‘appId: 801A048A-9F23-429F-BF0D-B6D35B22771E ‘ \

Response ‒ Rules/Get (Specific)

For the requested Rule, the response provides the properties in Rules/Post.

Example JSON Rules/Get (Specific) Response

Status 200 – OK

{

“@odata.context”: “https://dev-axonizeapi-axonize.dev-ase-axonize.p.azurewebsites.net/odata/$metadata#Rules/$entity”,

“name”: “New Rule”,

“description”: “New Rule Description”,

“active”: true,

“severity”: “Warning”,

“cronSchedule”: null,

“type”: “Conditional”,

“timezone”:”Asia/Jerusalem”

“category”: null,

“level”: “ByApp”,

“automaticallyDismiss”: false,

“notifyOnRestore”: false,

“tenantId”: “580c7cfbcb597ad4e824e1fd”,

“id”: “5873c267fce97a28389d3aa1”,

“appId”: “fe8c3dfa-74a3-4a89-ad01-0b1dc5abbca2”,

“createDate”: “0001-01-01T00:00:00Z”,

“createUser”: null,

“updateDate”: “0001-01-01T00:00:00Z”,

“updateUser”: null,

“actions”: [

{

“id”: “5873c267fce97a28389d3a9f”,

“type”: “EventLogEntry”,

“emailProperties”: null,

“smsProperties”: null,

“phoneCallProperties”: null,

“alarmInstanceProperties”: null,

“eventLogEntryProperties”: null,

“commandProperties”: null,

“webServiceProperties”: null,

“ruleRecurrenceSettings”: null,

“additionalPropertyProperties”: null

},

{

“id”: “5873c267fce97a28389d3aa0”,

“type”: “AlarmInstance”,

“emailProperties”: null,

“smsProperties”: null,

“phoneCallProperties”: null,

“alarmInstanceProperties”: null,

“eventLogEntryProperties”: null,

“commandProperties”: null,

“webServiceProperties”: null,

“ruleRecurrenceSettings”: null,

“additionalPropertyProperties”: null

},

{

“id”: “5a73085321b5bc23f44878c1”,

“type”: “SMS”,

“emailProperties”: null,

“smsProperties”: {

“message”: “{severity} alarm from {deviceName} – {triggeringEvent} {operator} {threshold} on value {value}”,

“userIds”: [

“58346e394e418c088069d384”,

“583589234e418c088069d48e”

],

“userDetails”: []

},

“phoneCallProperties”: null,

“alarmInstanceProperties”: null,

“eventLogEntryProperties”: null,

“commandProperties”: null,

“webServiceProperties”: null,

“ruleRecurrenceSettings”: null,

“additionalPropertyProperties”: null

}

],

“restoreActions”: [],

“schedule”: null,

“weeklySchedule”: null,

“conditions”: [

{

“id”: “5a73084621b5bc23f44878bf”,

“appIdForRule”: “f51df5bf-8d3c-4ba5-9574-3f3b8d6a26be”,

“productId”: null,

“eventName”: “Temperature”,

“typeCode”: 7,

“threshold”: “12”,

“operator”: “>”,

“durationInMinutes”: 0,

“conditionCount”: 0,

“isRelative”: false,

“type”: “Threshold”,

“name”: “asfsaf”,

“ruleTarget”: “App Level Rule”,

“targetId”: “f51df5bf-8d3c-4ba5-9574-3f3b8d6a26be”,

“eventProductId”: null,

“devices”: [],

“locationConditionSettings”: null

}

],

“ruleRecurrenceSettings”: null

}