v1

latestOpenAPI 3.0.32026-07-171140286.6 KB
Api\AlertRuleController

api/alert-rules/{id} POST Create the specified user alert rule.

post/api/alert-rules

Headers

Authorizationstring
Content-Typestring
Acceptstring
Accept-languagestring

Request body

namestring

The name of the alert rule.

descriptionstring

The description of the alert rule.

measurement_idinteger

Het value veld is verplicht wanneer <code>formulas</code> niet aanwezig is.

calculationstring

Het value veld is verplicht wanneer <code>formulas</code> niet aanwezig is.

comparatorstring

Het value veld is verplicht wanneer <code>formulas</code> niet aanwezig is.

comparisonstring

Het value veld is verplicht wanneer <code>formulas</code> niet aanwezig is.

threshold_valuenumber

Het value veld is verplicht wanneer <code>formulas</code> niet aanwezig is.

calculation_minutesstring required
alert_on_occurrencesinteger

Amount of occurences that a calculated value goed beyond the threshold_value. If not filled the standard is 1 (immediate alert).

alert_via_emailboolean

Set to false (0) if an e-mail should NOT be sent on alert. Default: true (1).

webhook_urlstring

URL of optional endpoint to call on alert for web hook integration.

activeboolean

Set to false (0) if the alert should NOT be active. Default: true (1).

exclude_monthsstring[]

Array of month indexes (1-12). If not filled the standard alert is 'always on'.

exclude_hoursstring[]

Array of hour indexes (0-23). If not filled the standard alert is 'always on'.

exclude_hive_idsstring[]

Array of Hive ids. If not filled the standard alert is evaluated on 'all hives'.

Example request

{
  "name": "repellendus",
  "description": "nihil",
  "measurement_id": 12,
  "threshold_value": 3527054.7321377,
  "formulas": [
    []
  ],
  "calculation_minutes": "totam",
  "alert_on_occurrences": 19,
  "webhook_url": "voluptas",
  "active": true,
  "exclude_months": [
    1,
    2,
    3,
    11,
    12
  ],
  "exclude_hours": [
    0,
    1,
    2,
    3,
    22,
    23
  ],
  "exclude_hive_ids": [
    "corporis"
  ]
}