post
https://rulesservice-dev.aylanetworks.com/rulesservice/v1/rules.json
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Parameters:
| Parameter | Description |
|---|---|
name | Rule Name |
description | Brief information about the rule |
expression | Expression of a logical statement about relationship between the entities.Expressions always evaluate to true or false. If they evaluate to true, the rule performs the associated action(s).Example 1: str_equals(DATAPOINT(AC000W000000001,cmd),'on')Example 2*: VIRTUAL(uuid_2) && ((DATAPOINT(dsn_1,prop_name_1) - DATAPOINT(dsn_2, prop_name_2) > DATAPOINT(dsn_3,prop_name_3) + DATAPOINT(dsn_4,prop_name_4) ) && (distance_miles(LOCATION(uuid_1),LOCATION(dsn_1))) < 112) Example 3: DATAPOINT( ${oem\_model == podth1})Example 4: CONNECTION(AC000W000000001,offline) |
actions_ids | List of action IDs associated with the rule. (optional) |
is_template | Indicates if the rule is a template. Mandatory if the rule is a template. If true, expression must be abstract, i.e. defined on a group of devices. (optional) |
is_subscription | This parameter is mandatory if the rule is of type "SUBSCRIPTION". actions_ids associated should also be of type SUBSCRIPTION. |
user_uuid | This is used by API caller to create action on behalf of the user who has the USER UUID registered with the OEM. Only OEM::Admin roles can use this parameter. |
{
"rule": {
"action_ids": [
"20f70752-43c2-11ed-9d74-c7306797f69e"
],
"description": "Rule Description",
"expression": "DATAPOINT(TESTDSN_763168_004,integer_input_tp)==10",
"is_subscription": "true",
"name": "TestRule-7422007-408843"
}
} 400Bad Request
401Unauthorized
403Forbidden
404Not Found
422Unprocessable Entity
