post https://rulesservice-dev.aylanetworks.com/rulesservice/v1/actions/bulk.json
This API creates new actions in bulk.
NOTE: If create operation fails for any of the actions in the request, execution of request will be interrupted, and all the new actions that might have been created as the result of the request will be deleted (rolled back).
Parameter description:
- name: User given name to the action.(mandatory)
- type: User given action type (AMS_EMAIL, AMS_PUSH, AMS_SMS). Refer Get action types.(mandatory)
- parameters: Contains key / value pairs with information relevant to the action to be performed.
- Example: DATAPOINT action
Required parameter: 'datapoint'
"parameters": {
"datapoint": "DATAPOINT(VD72f801390000023, Blue_LED) = true"
} - Example: URL parameter
Required parameter: 'datapoint'
"parameters": {
"body": "This is url action body",
"endpoint": "https://exampleurllink.com"
} - Example: DIAGNOSTIC Action
Required parameter: 'datapoint'
"parameters": {
"diagnostc_state_name": "red"
}
- Example: DATAPOINT action
- name: User given name to the action.
- rule_ids: UUID(s) of the rule(s) to be associated with the action.
- destination_ids: Destination UUID(s) to be associated with the action.
{
"actions":[
{
"name":"Property action 1",
"type":"DATAPOINT",
"parameters":{
"datapoint":"DATAPOINT(TESTDSN_ARE030744_0001,boolean_input_tp) = true"
}
},
{
"name":"Property action 2",
"type":"DATAPOINT",
"parameters":{
"datapoint":"DATAPOINT(TESTDSN_ARE030744_0002,boolean_input_tp) = true"
}
},
{
"name":"Property action 3",
"type":"DATAPOINT",
"parameters":{
"datapoint":"DATAPOINT(TESTDSN_ARE030744_0003,boolean_input_tp) = true"
}
}
]
}