AgentronicsDOCS
Enterprise

Data export

How audit logs and traces leave the gateway — JSON/CSV and webhooks via the API.

Data export

Three things customers ask for: a copy of their audit log, a copy of their raw traces, and a webhook stream to their own warehouse. All three are available through the gateway API, covered below.

Audit log

Every dashboard mutation writes a row to the org's audit table. The exporter route returns those rows in either JSON or CSV.

# JSON
curl -X POST https://gateway.agentronics.dev/v1/audit/export \
  -H 'authorization: Bearer agtx_sk_...' \
  -H 'content-type: application/json' \
  -d '{}'
 
# CSV (browser will download attachment)
curl -X POST https://gateway.agentronics.dev/v1/audit/export \
  -H 'authorization: Bearer agtx_sk_...' \
  -H 'content-type: application/json' \
  -d '{ "format": "csv" }' > audit.csv

The endpoint is scoped to the calling org — there is no admin-level "export everything" path. CSV columns are stable: id, orgId, actor, action, target, metadata, occurredAt.

Traces

GET /v1/traces paginates by cursor, filters by class/type/time:

curl 'https://gateway.agentronics.dev/v1/traces?limit=200&type=tool.executed&since=2026-05-01T00:00:00Z' \
  -H 'authorization: Bearer agtx_sk_...'

Response: { events: TraceEvent[], nextCursor: string | null }. Pass nextCursor back as ?cursor= to page.

Use GET /v1/metrics?since=... for pre-aggregated counts (per type, per outcome, per hour). The SDK already hourly-rolls up the trace stream so analytics queries don't pay the raw cost.

Webhooks

Schedule a delivery from your dashboard or via API:

curl -X POST https://gateway.agentronics.dev/v1/webhooks/test \
  -H 'authorization: Bearer agtx_sk_...' \
  -H 'content-type: application/json' \
  -d '{ "url": "https://your-host.example.com/agentronics", "payload": { "ping": true } }'

The cron-driven dispatcher drains the pending queue every minute. Failed deliveries retry up to 3 times with backoff before being dead-lettered. Dead-lettered deliveries stay queryable via GET /v1/webhooks so you can inspect what didn't make it.

Available channels

ChannelNotes
POST /v1/audit/export (JSON / CSV)Per-org audit rows; stable columns.
GET /v1/traces (paginated)Cursor-based, 200 max per page.
POST /v1/webhooks/test + cron drain3 retries → dead-letter, queryable via GET /v1/webhooks.

On this page