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/retentionReturns the current policy. Works for operators and admins.
Response fields
retention_daysnumberoptionalEvents older than this are deleted, unless an open alert refers to them.
hard_backstop_daysnumber or nulloptionalEvents older than this are deleted even with an open alert.
null means off.interval_hoursnumberoptionalHours between sweeps.
updated_atstringoptionalWhen the policy was last changed.
Responses
200
The policy.
401
You are not signed in.
Change the retention policy
PUT
/settings/retentionReplaces the policy. The retention service uses it from the next sweep, with no restart. Requires the admin role.
Body
retention_daysnumberrequiredMore than 0.
hard_backstop_daysnumber or nulloptionalMore than
retention_days. Send null or leave it out to turn the backstop off.interval_hoursnumberrequiredMore 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/healthReturns 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
camerasarrayoptionalThe cameras, with name, status, edge node and
last_frame_at. No source URLs.edge_nodesarrayoptionalThe edge nodes, with
last_heartbeat.open_alertsintegeroptionalHow many alerts are open.
total_eventsintegeroptionalHow many events are stored.
Responses
200
The summary.
401
You are not signed in.
Was this page helpful?