Action
Manage Actions.
Create
Create an automated action.
Endpoint
HTTP
POST /action/createAuthorized User Role
adminRequest Body
| Field | Type | Required | Notes |
|---|---|---|---|
| args | object | Action arguments. | |
| buffer | object | Metric action buffering controls. { sum: number, count: number, elapsed: number, force: boolean} Where "sum" is the total of metric values, "count" is the number of triggered actions, "elapsed" it the time in seconds to buffer the metric and "force" will force a write of the buffer metric data, . | |
| cloudId | string | yes | Cloud ID. |
| context | object | Action context. | |
| description | string | Action description. | |
| destination | string | Action destination. | |
| enable | boolean | Action enable flag. | |
| error | string | Action error. | |
| expression | string | Action expression. | |
| format | string | Action format. | |
| message | string | Action message. | |
| name | string | yes | Action name. |
| poll | number | Action polling interval. | |
| rearm | number | Action rearming interval. | |
| severity | string | Action severity. | |
| trigger | string | yes | Action trigger. |
| type | string | yes | Action type. |
Response
Action Record.
| 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 | Action description. |
| destination | string | URL, email address, function name, topic, phone number. |
| due | number | When the action is next due. |
| enable | boolean | Enable or disable the action. |
| error | string | Error message from last invocation. |
| expression | string | Trigger expression. |
| format | string | Message format. |
| id | string | Unique action ID. |
| name | string | Action name. |
| poll | number | Delay between pollng the trigger. |
| rearm | number | Time period to suppress triggering. |
| severity | string | Alert severity. |
| trigger | string | Source of action trigger. |
| type | string | Action type. |
Find
Find actions by cloud ID and optional type.
Endpoint
HTTP
POST /action/findAuthorized User Role
userRequest Body
| Field | Type | Required | Notes |
|---|---|---|---|
| cloudId | string | yes | Cloud ID. |
| type | string | Action type. |
Query String Options
| Field | Type | Default | Notes |
|---|---|---|---|
| index | string | Index name: primary or gs1. | |
| limit | number | Limit number of results. | |
| next | object | Token for next page. | |
| prev | object | Token for previous page. |
Response
Paged response.
| Field | Type | Notes |
|---|---|---|
| data | array | Array of matching actions. |
| 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
| 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 | Action description. |
| destination | string | URL, email address, function name, topic, phone number. |
| due | number | When the action is next due. |
| enable | boolean | Enable or disable the action. |
| error | string | Error message from last invocation. |
| expression | string | Trigger expression. |
| format | string | Message format. |
| id | string | Unique action ID. |
| name | string | Action name. |
| poll | number | Delay between pollng the trigger. |
| rearm | number | Time period to suppress triggering. |
| severity | string | Alert severity. |
| trigger | string | Source of action trigger. |
| type | string | Action type. |
Get
Get an action by cloud ID and action ID.
Endpoint
HTTP
POST /action/getAuthorized User Role
adminRequest Body
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | Action ID. |
| cloudId | string | yes | Cloud ID. |
| type | string | yes | Action type. |
Response
Action Record.
| 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 | Action description. |
| destination | string | URL, email address, function name, topic, phone number. |
| due | number | When the action is next due. |
| enable | boolean | Enable or disable the action. |
| error | string | Error message from last invocation. |
| expression | string | Trigger expression. |
| format | string | Message format. |
| id | string | Unique action ID. |
| name | string | Action name. |
| poll | number | Delay between pollng the trigger. |
| rearm | number | Time period to suppress triggering. |
| severity | string | Alert severity. |
| trigger | string | Source of action trigger. |
| type | string | Action type. |
Remove
Remove an action by cloud ID and action ID.
Endpoint
HTTP
POST /action/removeAuthorized User Role
adminRequest Body
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | Action ID. |
| cloudId | string | yes |
Update
Update an action by cloud ID and action ID.
Endpoint
HTTP
POST /action/updateAuthorized User Role
adminRequest Body
| Field | Type | Required | Notes |
|---|---|---|---|
| args | object | Action arguments. | |
| buffer | object | Action buffering controls. | |
| cloudId | string | yes | Cloud ID. |
| context | object | Action context. | |
| description | string | Action description. | |
| destination | string | Action destination. | |
| enable | boolean | Action enable flag. | |
| error | string | Action error. | |
| expression | string | Action expression. | |
| format | string | Action format. | |
| id | string | yes | Action ID. |
| message | string | Action message. | |
| name | string | Action name. | |
| poll | number | Action polling interval. | |
| rearm | number | Action rearming interval. | |
| severity | string | Action severity. | |
| trigger | string | Action trigger. | |
| type | string | Action type. |
Response
Action Record.
| 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 | Action description. |
| destination | string | URL, email address, function name, topic, phone number. |
| due | number | When the action is next due. |
| enable | boolean | Enable or disable the action. |
| error | string | Error message from last invocation. |
| expression | string | Trigger expression. |
| format | string | Message format. |
| id | string | Unique action ID. |
| name | string | Action name. |
| poll | number | Delay between pollng the trigger. |
| rearm | number | Time period to suppress triggering. |
| severity | string | Alert severity. |
| trigger | string | Source of action trigger. |
| type | string | Action type. |
