Audit Log
Query the immutable record of all approved changes.
List audit entries
Retrieve audit entries for a project. Every approved mutation is permanently recorded with before/after values.
GET /auditRequest
curl "http://localhost:8080/audit?project_id=my-project&limit=50"Response
{
"entries": [
{
"id": "aud_001",
"session_id": "sess_abc123",
"project_id": "my-project",
"table_name": "users",
"operation": "UPDATE",
"row_id": "5",
"old_data": {
"id": 5,
"name": "Alice",
"role": "user"
},
"new_data": {
"id": 5,
"name": "Alice",
"role": "admin"
},
"approved_at": "2024-01-15T10:40:00Z",
"approved_by": "user@example.com"
},
{
"id": "aud_002",
"session_id": "sess_abc123",
"project_id": "my-project",
"table_name": "orders",
"operation": "DELETE",
"row_id": "10",
"old_data": {
"id": 10,
"user_id": 5,
"amount": 25.00,
"status": "cancelled"
},
"new_data": null,
"approved_at": "2024-01-15T10:40:00Z",
"approved_by": "user@example.com"
}
],
"total_count": 2,
"has_more": false
}Query parameters
| project_id | string | Filter by project (required) |
| session_id | string | Filter by session |
| table_name | string | Filter by table |
| operation | string | Filter by type (INSERT, UPDATE, DELETE) |
| since | ISO 8601 | Entries after this timestamp |
| until | ISO 8601 | Entries before this timestamp |
| limit | number | Max entries to return (default: 100, max: 1000) |
| offset | number | Pagination offset |
Get single entry
Retrieve a specific audit entry by ID.
GET /audit/:idImmutability
Audit entries are append-only and cannot be modified or deleted. This ensures a complete forensic trail for compliance and debugging.
- Every approved mutation creates an audit entry
- Before/after values are captured at approval time
- Session and user attribution is recorded
- Timestamps use server time (UTC)