Structs§
- AiIngest
- Payload an AI worker POSTs to ingest detections (and optionally an event) for a camera.
- AiTask
- A perception task to run on a camera (consumed by AI workers).
- AiTask
Create - AiTask
Update - ApiKey
- ApiKey
Create - ApiKey
View - Archive
Export Request - Request body for POST /api/v1/archive/export — zip a selection of recorded footage on demand.
- Backup
Destination - A backup transfer target.
configis a kind-specific JSON blob (credentials live here and are never serialized raw — useBackupDestinationView). NotSerializefor exactly that reason. - Backup
Destination Create - Backup
Destination Update - Backup
Destination View - Client-facing destination: secret config values are replaced with
***. - Backup
Job - A single backup run (policy-scheduled, manually triggered, or an on-demand archive export).
- Backup
Policy - A scheduled backup policy: ship a camera selection’s recent footage to a destination on an interval.
- Backup
Policy Create - Backup
Policy Update - Backup
Test Result - Result of POST /api/v1/backup/destinations/{id}/test (a connectivity / writability probe).
- Camera
- Camera row as stored.
passwordis never serialized to clients; useCameraViewfor output. - Camera
Create - Payload to create a camera.
idmay be omitted (slug auto-derived from name). - Camera
Onvif - Per-camera ONVIF device profile, populated by
crate::services::onvif::probe.scopesis a JSON array of ONVIF scope URIs.ptz_enabledis true when the device exposes a PTZ service and the chosen media profile carries a PTZConfiguration. - Camera
Status - Camera
Update - Partial update; only present fields are changed.
- Camera
View - Client-facing camera representation: credentials stripped, stream URLs masked.
- Detection
- A detection result posted by an AI worker.
- Detection
Ingest - One detection inside an ingest request.
- Event
- Ingest
Event - Optional event an AI worker can raise alongside its detections.
- Login
Request - Persisted
Snapshot - A captured snapshot frame on disk (one file under snapshots_dir/{camera_id}/).
- PtzPreset
- A PTZ preset fetched from a camera’s ONVIF PTZ service (GetPresets). One row per (camera, token).
- Record
Schedule - A recurring per-camera recording window, applied when the camera’s
record_modeisscheduledorscheduled_event.daysis a JSON array of weekday ints (0=Mon..6=Sun);time_start/time_endare “HH:MM” 24h in the SERVER’s LOCAL timezone (chrono::Local). Whentime_start>time_endthe window wraps past midnight (its early-morning portion is attributed to the day it started on). - Record
Schedule Create - Record
Schedule Update - Recording
Gap - A recording gap detected by the indexer (a hole > 3s between consecutive segments). The ANR loop
(services/anr.rs) tries to re-fill pending gaps from the camera’s onboard storage.
fill_stateispending|filled|failed. - Segment
- Snapshot
Schedule - A per-camera schedule that captures a live JPEG every
interval_seconds. - Snapshot
Schedule Create - Snapshot
Schedule Update - User
- Operator account.
password_hashis never serialized; useUserViewfor output. - User
Create - User
Update - User
View - Zone
- A polygon region on a camera; tracked detections crossing it raise enter/exit/dwell events.
- Zone
Create - Zone
Event - Zone
Update
Constants§
- BACKUP_
SECRET_ KEYS - Config keys that hold a secret. Masked in
BackupDestinationView(and preserved across an update when the client round-trips the***placeholder back).
Functions§
- mask_
backup_ config - Mask the secret values in a config blob, returning the masked blob and whether any secret was set.