Create Alert Rule
POST/v1/alert-rule
Create a new alert rule within your company by companyUid.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| No parameters |
Body
| FIeld | Type | Required | Description |
|---|---|---|---|
name | string | required | Name of the new alert rule, at least two visible characters |
companyUid | string | required | Unique Company Identification |
alertType | string | optional | Not stored; the rule is created as DEVICE. Only selects the feature entitlement the request is checked against. |
filter | object | optional | Devices the rule evaluates. Default, also for null: {}, every device of the target organizations. |
threshold | object | optional | Share of matching devices that creates an alert. Default: { type: 'percentage', percentage: 0 }. |
periodicity | object | optional | Evaluation interval, and when devices are evaluated: inside weekly windows or, with followDeviceTimers, while each device's own on/off timers keep it on. Default: every hour, the whole week. |
action | object | optional | What happens when the rule creates an alert. Default: notify the creating account. |
Request
Responses
- 201
- 400
- 402
- 404
Created
Bad request
Payment Required - Feature entitlement missing
Not Found