Executes the specified instruction against given input objects
Param name | Description |
---|---|
instruction_applicability required |
Whether to execute an instruction on: 2: sensors of a particular type 3: specified sensors Value: Must be Integer. |
instruction_applicability_value required |
sensor type or a sensor_key or an array of sensor keys depending on the value of instruction_applicability |
pretty optional |
Return a pretty formatted response if true, Default is false Value: Must be a Boolean |
Request - execute an instruction against all sensors of type 'Energy Meter' curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:olezAZXGQn9MutnfNerKDQ" -d '{"instruction_applicability":"2","instruction_applicability_value":"Energy Meter"}' https://api.datonis.io/api/v2/instructions/a5ad49t441/execute Response (list of sensor alert keys describing execution status of the instruction against each sensor) { "status": [ "7c1fb74f57", "8e13bf7517" ] }
Request - execute an instruction against specified sensors curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:olezAZXGQn9MutnfNerKDQ" -d '{"instruction_applicability":"3","instruction_applicability_value":["16dc891e4b255735d7tafete13e6fdc412628t84","27ce8667143fa217b3eb9ecbedcbacdc28addt97"]}' https://api.datonis.io/api/v2/instructions/a5ad49t441/execute Response (list of sensor alert keys describing execution status of the instruction against each sensor) { "status": [ "2577aaf9t6", "7a78ae52c8" ] }