πŸ“‹
Available

Audit Trail

Audit Trail provides an immutable (append-only) event log stored in PostgreSQL with integrity guarantees. Every event is timestamped, signed, and indexed for fast querying. The service is natively GDPR-compliant, with functions to export personal data (right of access) and anonymize it (right to erasure). Asynchronous ingestion via Redis Streams guarantees high performance with no impact on your business services. Ideal for regulatory compliance, internal audits, and operation traceability.

GDPRImmutableAsyncCompliance

How it works

1

Emit an event

Send a structured event (actor, action, resource, metadata) via the REST API. Ingestion is asynchronous via Redis Streams.

2

Immutable persistence

The event is persisted in PostgreSQL in append-only mode with a timestamp, integrity hash, and search index.

3

Querying and filtering

Search events by actor, action, resource, period, or metadata with pagination and sorting.

4

Export and anonymization

Export a user's events (GDPR access) or anonymize them (GDPR erasure) in a single API call.

API call example

log_audit_event.py
import httpx

class=class="text-teal">"text-text-faint italic"># Log an audit event
response = httpx.post(
    class="text-teal">"https:class="text-text-faint italicclass="text-teal">">//api.djinn.dev/v1/events",
    headers={class="text-teal">"X-API-Key": class="text-teal">"djinn_live_..."},
    json={
        class="text-teal">"actor": {class="text-teal">"id": class="text-teal">"user_42", class="text-teal">"type": class="text-teal">"user", class="text-teal">"email": class="text-teal">"alice@acme.fr"},
        class="text-teal">"action": class="text-teal">"document.extracted",
        class="text-teal">"resource": {class="text-teal">"id": class="text-teal">"doc_789", class="text-teal">"type": class="text-teal">"invoice"},
        class="text-teal">"metadata": {
            class="text-teal">"confidence": 0.97,
            class="text-teal">"processing_time_ms": 1250,
        },
    },
)

event = response.json()
print(fclass="text-teal">"Event ID: {event['id']}")
print(fclass="text-teal">"Timestamp: {event['timestamp']}")
print(fclass="text-teal">"Hash: {event['integrity_hash']}")

class=class="text-teal">"text-text-faint italic"># Query events for GDPR export
events = httpx.get(
    class="text-teal">"https:class="text-text-faint italicclass="text-teal">">//api.djinn.dev/v1/events",
    headers={class="text-teal">"X-API-Key": class="text-teal">"djinn_live_..."},
    params={class="text-teal">"actor_id": class="text-teal">"user_42", class="text-teal">"limit": 100},
).json()
print(fclass="text-teal">"Total events: {events['total']}")

Technical specifications

FormatsJSON (input/output)
Max sizeUnlimited
P95 latency< 100ms (log) / < 500ms (query)
SLA99.9%

Ready to integrate this service?

Test the API free with 1,000 calls included. Integrate in minutes.