Alert rule schema
Alert rules define when NovaVMS should notify operators. This page lists every field, its type, default, and constraints.
Fields
| Field | Type | Default | Required | Constraints |
|---|---|---|---|---|
name | string | - | yes | 3-100 chars. Regex ^[a-zA-Z0-9 \-_.()]{3,100}$. Unique per org (case-insensitive). |
enabled | boolean | true | no | Takes effect immediately on change. |
trigger_type | enum | - | yes | One of motion, ai_person, ai_vehicle, camera_offline, ai_custom_tag. |
custom_tags | string[] | - | only when trigger_type=ai_custom_tag | 1-20 tags from the canonical vocabulary. |
min_confidence | float | 0.70 | only for AI trigger types | 0.0 - 1.0, step 0.05. |
scope_type | enum | all_cameras | yes | One of all_cameras, by_site, by_camera. |
site_ids | uuid[] | - | only when scope_type=by_site | 1 or more site UUIDs. |
camera_ids | uuid[] | - | only when scope_type=by_camera | 1 or more camera UUIDs. |
zones_filter | string[] | - | no | Motion-zone names to match. Intersects with scope. |
schedule_type | enum | always | yes | One of always, business_hours. See Schedule object. |
cooldown_sec | integer | 300 | no | 60 - 3600 s. Per (rule_id, camera_id) pair. |
recipients | object[] | - | yes | 1 - 20 entries. See Recipient object. |
Max 100 rules per org. Max 20 recipients per rule.
Trigger types
motion
| Field | Type | Default | Constraints |
|---|---|---|---|
trigger_type | literal | - | Must be motion. |
Evaluated on the immediate path. Fires within 500 ms of the motion event.
ai_person / ai_vehicle
| Field | Type | Default | Constraints |
|---|---|---|---|
trigger_type | literal | - | ai_person or ai_vehicle. |
min_confidence | float | 0.70 | 0.0 - 1.0, step 0.05. |
Evaluated on the delayed path, after AI analysis completes on the event.
ai_custom_tag
| Field | Type | Default | Constraints |
|---|---|---|---|
trigger_type | literal | - | Must be ai_custom_tag. |
custom_tags | string[] | - | 1 - 20 tags. Values must be in the canonical vocabulary. |
min_confidence | float | 0.70 | 0.0 - 1.0. |
camera_offline
| Field | Type | Default | Constraints |
|---|---|---|---|
trigger_type | literal | - | Must be camera_offline. |
Fires when a camera is offline for 5 minutes continuously. No confidence field.
manual
Manual triggers (the Record Clip button) always generate an event but do not match alert rules. Use the manual event type on the Events page to find them.
Schedule object
| Field | Type | Default | Constraints |
|---|---|---|---|
schedule_type | enum | always | One of always, business_hours. |
| Effective hours (always) | - | 24/7 | Fires any time the other conditions match. |
| Effective hours (business_hours) | - | Mon-Fri 08:00 - 18:00 | Site timezone. Saturday and Sunday are excluded. |
Custom day/time windows are not in v1. Cron-style schedules are deferred.
Recipient object
| Field | Type | Default | Constraints |
|---|---|---|---|
user_id | uuid | - | Must be an active user in the same org. |
channels | string[] | ["in_app"] | Subset of ["in_app", "email"]. |
Recipients appear on the alert in the order the operator added them. Duplicate recipients per rule are rejected.
Example
{ "name": "Loading dock person after hours", "enabled": true, "trigger_type": "ai_person", "min_confidence": 0.8, "scope_type": "by_camera", "camera_ids": ["5e3c7f...", "5e3d2a..."], "schedule_type": "business_hours", "cooldown_sec": 300, "recipients": [ {"user_id": "a1b2c3...", "channels": ["email", "in_app"]}, {"user_id": "d4e5f6...", "channels": ["in_app"]} ]}Related
- Audit actions —
alert_rule.*entries logged on every change - Roles and permissions — who can create alert rules and who can view webhook secrets