Skip to main content

Audit Log API

Read-only immutable audit trail with filtering, export, and per-resource history.

Endpoints Overview

MethodEndpointDescription
GET/spaces/{slug}/audit-logList audit entries
GET/spaces/{slug}/audit-log/exportExport (JSON/CSV)
GET/spaces/{slug}/audit-log/{resource_type}/{resource_id}Resource history

List Audit Entries

GET /spaces/{slug}/audit-log

Query Parameters

ParameterTypeDescription
actionstringFilter by action type
resource_typestringFilter by resource type
user_idUUIDFilter by acting user
start_datedatetimeStart of date range
end_datedatetimeEnd of date range

Response

[
{
"id": "...",
"user": { "id": "...", "email": "alice@example.com", "full_name": "Alice" },
"action": "create",
"resource_type": "product",
"resource_id": "...",
"resource_name": "Customer Events",
"details": {},
"ip_address": "192.168.1.1",
"created_at": "2026-01-15T10:30:00Z"
}
]

Export Audit Log

GET /spaces/{slug}/audit-log/export?fmt=csv

Export up to 10,000 rows as JSON array or CSV file. Supports the same query parameters as the list endpoint.


Resource History

GET /spaces/{slug}/audit-log/{resource_type}/{resource_id}

Returns the audit history for a single resource (e.g., a specific product or quality check).