Audit trail
Who changed what and when, plus optional redacted request bodies for admin API calls.
HydroGo writes security-relevant and content-changing actions to an append-only audit trail: signing in, role changes, token and API key lifecycle, publishing, content edits and more. Open it in the admin under Audit Log, or read it from GET /api/v1/admin/audit.
What an entry contains
| Field | Meaning |
|---|---|
at | When it happened (UTC). |
actor, actor_id | The user who did it, or system for background work. |
action | What happened, for example auth.api_key.issued. |
resource, target | The kind of thing changed and its id. |
request_id | The request id, to match logs and API error responses. |
before_json, after_json | Compact before and after details where the action records them (for example version numbers). |
Filter the list by actor, action, resource or target, in the admin or the API:
curl 'https://cms.example.com/api/v1/admin/[email protected]&action=admin.request&limit=50' \
-H 'Authorization: Bearer hyd_…'Recording request bodies
By default an entry says *that* something changed. To also see *what the client sent*, turn on request-body logging. It is off by default.
audit:
log_request_bodies: trueWith it enabled, every state-changing admin API request (POST, PUT, PATCH, DELETE under /api/v1/admin/) by a signed-in user adds one admin.request entry containing the method, path, status code, client IP, user agent, redacted query string and the redacted JSON body.
| Safeguard | Behaviour |
|---|---|
| Secrets are redacted | Any JSON key whose name contains password, secret, token, authorization, cookie, credential, private, signature, api_key, totp, mfa, recovery or otp is replaced by [redacted], at any depth. |
| Bodies are capped | Details are kept under a few KiB (about 3.8 KiB). Long strings and deep structures are shortened; if it still does not fit, the body is dropped and body_truncated is set. |
| Oversized requests | A body larger than 64 KiB is not captured at all; the entry says so. |
| Only JSON | File uploads and non-JSON requests are skipped. |
| The request is untouched | The handler still receives the complete body; capture only reads a bounded copy. |
{
"method": "PUT",
"path": "/api/v1/admin/pages/pg_01",
"status": 200,
"ip": "203.0.113.7",
"user_agent": "Mozilla/5.0 …",
"body": { "title": "About us", "password": "[redacted]" }
}Retention
Audit entries live in your database. Include them in backups, and prune according to your own retention policy.