v1

latestOpenAPI 3.0.32026-07-24214879985.1 KB
Event Alert Rules

Create a new rule that produces alerts based on certain conditions. Specifically, the user specifies alert conditions that indicate when the alert is produced based on following:

  • Which resources can produce the alert
  • What is the schedule for the alert.
  • What event types can produce the alert.

Resellers may create rules on behalf of an end user account by setting endUserAccountId in the request body. The reseller must have permission to edit automations on that end user account.

post/eventAlertConditionRules

Request body

namestring

Name for the rule

priorityinteger

Defines the priority of the alert

notesstring

A verbose explanation of the rule

enabledboolean

Whether rule is enabled

cooldownSecondsinteger

Cooldown period (in seconds). If two events for the same actor and event type have event timestamps within this duration, only the first will trigger an alert while the second event will be suppressed. A value of 0 disables the cooldown checks.

Example request

{
  "name": "Alert on Motion detection",
  "notes": "Generate alerts on Motion Detection at night.",
  "humanValidation": {
    "enabled": true,
    "service": "eenV1"
  },
  "eventFilter": {
    "eventTypes": [
      "een.lprPlateReadEvent.v1"
    ],
    "resourceFilter": {
      "actors": [
        {
          "id": "100b913c"
        }
      ]
    }
  }
}

Response

Response on successful creation of the rule.

namestring

Name for the rule

priorityinteger

Defines the priority of the alert

notesstring

A verbose explanation of the rule

enabledboolean

Whether rule is enabled

cooldownSecondsinteger

Cooldown period (in seconds). If two events for the same actor and event type have event timestamps within this duration, only the first will trigger an alert while the second event will be suppressed. A value of 0 disables the cooldown checks.

idstring

The system generated id of this rule resource

createTimeStampstring date-time

Time at which the Alert Condition Rule was created.

updateTimeStampstring date-time

Time at which the Alert Condition Rule was last updated.

outputAlertTypesstring[]

Possible Alert Types that are producible by this rule. For a given event, what alert is produced depends on the configuration parameters of the rule and the event properties.

endUserAccountIdstring nullable

The end user account this rule targets. Available only for a rule created by a reseller targeting an end user; null otherwise.

Example response

{
  "name": "Alert on Motion detection",
  "notes": "Generate alerts on Motion Detection at night.",
  "humanValidation": {
    "enabled": true,
    "service": "eenV1"
  },
  "eventFilter": {
    "eventTypes": [
      "een.lprPlateReadEvent.v1"
    ],
    "resourceFilter": {
      "actors": [
        {
          "id": "100b913c"
        }
      ]
    }
  },
  "createTimeStamp": "2021-04-22T00:00:00.000+00:00",
  "updateTimeStamp": "2021-04-22T00:20:00.000+00:00",
  "outputAlertTypes": [
    "een.motionDetectionAlert.v1"
  ],
  "endUserAccountId": "00012345"
}