This API creates an action of the specified action type. Actions are associated with rules which listen for events. When an event occurs that causes a rule to evaluate to true, then the Ayla Rule Engine performs the action(s) associated with the rule. Action names must be unique for a particular user. See also Get action types.
Example request data
Actions include one or more parameters that supply the action with values (e.g. set the Blue_LED property to 1; post a json object to an endpoint). The action type dictates which parameters are required. Below are examples:
The required parameter is datapoint, which contains an ARES expression that assigns a value to a to-device property.
The required parameters are body, a stringified JSON object, and endpoint, a url. The primary purpose of this action type is to post the body to the endpoint, replacing placeholders in body with values taken from the triggering event. It is the responsibility of the service to retrieve additional data as needed. The Alexa OAuth helper is an example of such a service.