Skip to main content

Settings

The retention policy decides how long events and clips are kept. See Retention for how the sweep works.

Get the retention policy​

GET/settings/retention

Returns the current policy. Works for operators and admins.

Response fields​

retention_daysnumberoptional
Events older than this are deleted, unless an open alert refers to them.
hard_backstop_daysnumber or nulloptional
Events older than this are deleted even with an open alert. null means off.
interval_hoursnumberoptional
Hours between sweeps.
updated_atstringoptional
When the policy was last changed.

Responses​

200
The policy.
401
You are not signed in.

Change the retention policy​

PUT/settings/retention

Replaces the policy. The retention service uses it from the next sweep, with no restart. Requires the admin role.

Body​

retention_daysnumberrequired
More than 0.
hard_backstop_daysnumber or nulloptional
More than retention_days. Send null or leave it out to turn the backstop off.
interval_hoursnumberrequired
More than 0.

Responses​

200
The policy was saved. Returns the new policy.
403
You are not an admin.
422
A value is out of range, or the backstop is not longer than the retention window.

Get system health​

GET/system/health

Returns a summary of the site for monitoring: the cameras, the edge nodes, the number of open alerts and the total number of events. Works for operators and admins. For a sign-in-free liveness check, use GET /health.

Response fields​

camerasarrayoptional
The cameras, with name, status, edge node and last_frame_at. No source URLs.
edge_nodesarrayoptional
The edge nodes, with last_heartbeat.
open_alertsintegeroptional
How many alerts are open.
total_eventsintegeroptional
How many events are stored.

Responses​

200
The summary.
401
You are not signed in.
Was this page helpful?