Action
Manage Automated Actions.
Actions implement automated responses for specific device and cloud conditions. Actions are invoked by triggers to respond and implement a specific remedy or notification. .
Find
Find actions by matching properties.
Endpoint
HTTP
POST /action/findAuthorized User Role
userRequest Body
| Field | Type | Required |
|---|---|---|
| cloudId | string | yes |
| type | string |
Query String Options
| Field | Type | Notes |
|---|---|---|
| filter | string | Full text string to filter for. |
| next | object | Pagination token for the next page. |
| prev | object | Pagination token for the previous page. |
| limit | number | Number of items to retrieve. |
| index | string | Database index to use. |
| exists | boolean | Set to true to require the item exists, otherwise set to null to perform an upsert. |
Response
Paged response.
| Field | Type | Notes |
|---|---|---|
| data | array | Array of items. |
| next | string | Paged cursor to use for the next page of items. |
| prev | string | Pages cursor to use for the previous page of items. |
Action
An array of Action items.
| Field | Type | Notes |
|---|---|---|
| args | object | Action args. |
| buffer | object | Buffer optimizations for metrics. |
| cloudId | string | Owning device cloud ID. |
| context | object | Trigger expression context, merged with user params. |
| description | string | |
| destination | string | URL, email address, function name, topic, phone number. |
| due | number | When the action is next due. |
| enable | boolean | |
| error | string | |
| expression | string | |
| format | string | |
| id | string | |
| message | string | Message template/properties. |
| name | string | |
| poll | number | Delay between pollng the trigger. |
| rearm | number | Time period to suppress triggering. |
| severity | string | |
| trigger | string | Source of action trigger. |
| type | string |
Get
Get an action by ID for a cloud.
Endpoint
HTTP
POST /action/getAuthorized User Role
adminRequest Body
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | Action ID. | |
| cloudId | string | yes | |
| type | string | yes |
Response
| Field | Type | Notes |
|---|---|---|
| args | object | Action args. |
| buffer | object | Buffer optimizations for metrics. |
| cloudId | string | Owning device cloud ID. |
| context | object | Trigger expression context, merged with user params. |
| description | string | |
| destination | string | URL, email address, function name, topic, phone number. |
| due | number | When the action is next due. |
| enable | boolean | |
| error | string | |
| expression | string | |
| format | string | |
| id | string | |
| message | string | Message template/properties. |
| name | string | |
| poll | number | Delay between pollng the trigger. |
| rearm | number | Time period to suppress triggering. |
| severity | string | |
| trigger | string | Source of action trigger. |
| type | string |
Invoke
Invoke an action by ID or name.
Endpoint
HTTP
POST /action/invokeAuthorized User Role
userRequest Body
| Field | Type | Notes |
|---|---|---|
| id | string | Action ID. |
| name | string | Action name if ID not provided. |
| params | object | Parameters for the action. |
| context | object | Context for the action. |
Response
A string.
