v1

latestOpenAPI 3.1.02026-07-171921144.8 KB
realtime

Start/stop always-on alert rules for an incoming camera event

Starts or stops always-on alert rules in response to a camera lifecycle event.

Behavior by event.change:

  • camera_streaming — starts one rule per entry in the always-on rules config. Idempotent per camera_id: repeats return reason STREAM_ADD_ALREADY_ACTIVE.
  • camera_remove — stops every rule previously started for that camera_id.

Responses carry a reason code (STREAM_ADD_SUCCESS, STREAM_ADD_PARTIAL_SUCCESS, STREAM_ADD_ALREADY_ACTIVE, STREAM_ADD_FAILED, or ALWAYS_ON_DISABLED) and a details array with one entry per rule.

post/api/v1/realtime/always-on

Request body

sourcestring nullable

Upstream producer tag (informational; e.g. 'vst')

alert_typestring nullable

Producer-assigned event type, e.g. 'camera_status_change'. Not to be confused with the always-on rule's alert_type in the YAML config — this one is informational and passes through unused.

created_atstring nullable

Producer-assigned creation timestamp (informational)

Response

Rules started/stopped successfully

reasonstring required
statusstring required
detailsobject[]