Create rule

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Parameters:

ParameterDescription
nameRule Name
descriptionBrief information about the rule
expressionExpression 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_idsList of action IDs associated with the rule. (optional)
is_templateIndicates 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_subscriptionThis parameter is mandatory if the rule is of type "SUBSCRIPTION". actions_ids associated should also be of type SUBSCRIPTION.
user_uuidThis 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"
	}
}
Body Params
json
required
Responses

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json