API Reference#

Version: 1.0.0 | Prerequisites: stack must be running (source setup.sh start)

Interactive Swagger UI: http://<HOST_IP>:8000/docs

Endpoints#

Cameras & Events#

Method

Path

Parameters

Description

GET

/cameras

List all configured cameras and their tracked object types

GET

/events

query: camera*

List events for a specific camera from Frigate

Rules#

Rules map object detection labels to actions per camera.

Method

Path

Parameters

Description

GET

/rules/

List all configured rules

POST

/rules/

body: Rule

Add a new rule — 400 if rule ID already exists

GET

/rules/{rule_id}

path: rule_id

Get a specific rule — 404 if not found

DELETE

/rules/{rule_id}

path: rule_id

Delete a rule — 404 if not found

GET

/rules/responses/

Get summary results for all non-search rules

GET

/rules/search-responses/

Get search results for all rules with action add to search

Watchers#

Per-camera directory watchers that detect new Frigate events. State persists in Redis across restarts; in-memory overrides reflect runtime changes.

Method

Path

Parameters

Description

POST

/watchers/enable

body: CameraWatcherRequest

Enable/disable directory watchers for one or more cameras — 503 if VSS Search service is unreachable

GET

/watchers/enable

Alias for GET /watchers/mapping

GET

/watchers/mapping

Get current watcher enable/disable state (merged Redis + runtime)

Health#

Method

Path

Description

GET

/

Service health check

GET

/health

Detailed health status

* Required parameter

Endpoints that accept path, query, or body parameters return 422 Unprocessable Entity on invalid input — see HTTPValidationError.


Schemas#

Rule#

Field

Type

Required

Description

id

string

Yes

Unique rule ID

label

string

Yes

Detection label (e.g. person, car)

action

string

Yes

Action to trigger (e.g. add to search)

camera

string | null

No

Camera scope; null = all cameras

source

string | null

No

Optional source identifier

count

int | null

No

Internal field; read-only

CameraWatcherRequest#

{ "cameras": [{ "<camera_name>": true }, { "<other_camera>": false }] }

cameras — array of objects, each mapping one camera name → true (enable) or false (disable).

CameraWatcherUpdateResponse#

Field

Type

Description

mapping

object

Persisted map of camera name → enabled flag

enabled

string[]

Currently enabled cameras

disabled

string[]

Currently disabled cameras

CameraWatcherMappingResponse#

Field

Type

Description

mapping

object

Current map of camera name → enabled flag (Redis + runtime)

warning

string (optional)

Set if Redis lookup failed

HTTPValidationError#

{ "detail": [{ "loc": ["body", "field"], "msg": "string", "type": "string" }] }

OpenAPI Spec#

# Live (requires running stack)
curl http://<HOST_IP>:8000/openapi.json

# From repo
cat docs/user-guide/api-docs/smart-nvr.yaml

Import into Swagger Editor, Bruno, or Insomnia for offline exploration.