Skip to content

API - Audit

Access audit logs for tracking API actions.

Get Audit Logs

GET /v1/audit

Requires admin or operator role.

bash
curl http://localhost:7200/v1/audit \
  -H "Authorization: Bearer $ROOT_TOKEN"

Response:

json
{
  "count": 2,
  "logs": [
    {
      "id": "20251220213751-97845c4e",
      "timestamp": "2025-12-20T21:37:51.288081105+05:45",
      "token_id": "654ed1e577243bf224d8de6a8896ac8b",
      "action": "set",
      "namespace": "billing/prod",
      "key": "HOST",
      "success": true
    },
    {
      "id": "20251220213500-309b90ae",
      "timestamp": "2025-12-20T21:35:00.477208308+05:45",
      "token_id": "654ed1e577243bf224d8de6a8896ac8b",
      "action": "get",
      "namespace": "billing/prod",
      "key": "HOST",
      "success": true
    }
  ]
}

Log Fields

FieldDescription
idUnique log entry ID
timestampWhen the action occurred
token_idID of the token that performed the action
actionAPI action (e.g. get, set, delete)
namespaceTarget namespace
keyTarget key (if applicable)
successWhether the action succeeded

Audit logs are also viewable in the Web UI.

Apache License 2.0