(feature) Add staff-only service status API

Add /api/status/ for quick inspection of database backend, object counts, latest
backup run, and latest scheduler activity. Link it from the API index and reuse
schedule serialization between host summaries and status output.

Cover the endpoint with a focused API test and document the new status URL.
This commit is contained in:
2026-05-19 11:46:22 +02:00
parent ccd89119da
commit 2778a589ea
4 changed files with 88 additions and 9 deletions

View File

@@ -38,6 +38,7 @@ The admin is available at:
Staff-only JSON endpoints are available at:
- http://127.0.0.1:8000/api/
- http://127.0.0.1:8000/api/status/
## SQL-First Setup
@@ -117,6 +118,7 @@ This starts Django on:
- http://127.0.0.1:8010/admin/
- http://127.0.0.1:8010/api/
- http://127.0.0.1:8010/api/status/
Run the scheduler alongside the web admin:
@@ -147,7 +149,7 @@ Discovered snapshots are stored in `SnapshotRecord`, including the base snapshot
base record when it is known.
The Django retention command plans from `SnapshotRecord` instead of rediscovering snapshots from the filesystem.
Post-backup pruning from Django also uses the SQL retention service after the completed snapshot is recorded.
Staff-only JSON endpoints expose hosts, snapshots, and backup runs for lightweight inspection.
Staff-only JSON endpoints expose service status, hosts, snapshots, and backup runs for lightweight inspection.
The remaining internal engine code still contains reusable backup primitives: