How to export a workspace's receipts (GET /api/audit/export)
Call GET /api/audit/export with your key or a signed-in session. Leave out workspaceId to get every chain you own, or add ?workspaceId=... for one workspace. Each bundle holds the receipts, the chain head and ClearRun's public keys, which you can check offline.
Last updated
Steps
Export everything you own
curl -s "https://api.clearrun.net/api/audit/export" \ -H "Authorization: Bearer $CLEARRUN_API_KEY" \ -o clearrun-audit.jsonYou get an object with
"scope": "account"and abundlesarray, one bundle per chain you own: your account-level chain (account:<accountId>) and each workspace whose audit level allows export. Nothing from other accounts is included.Or export one workspace
curl -s "https://api.clearrun.net/api/audit/export?workspaceId=WORKSPACE_ID" \ -H "Authorization: Bearer $CLEARRUN_API_KEY" \ -o clearrun-workspace.jsonYou get one bundle.
workspaceIdmust be a workspace on your account. Anaccount:id here returns 404. LeaveworkspaceIdout to get the account-level chain.Check it offline
Who can export
| Audit level | Plan that allows it | Bundle has |
|---|---|---|
none | Free and Pro | No export (403 AUDIT_LEVEL) |
summary | Business | Receipts and public verdicts |
full | Enterprise | Also the input and output text |
To set a workspace's audit level, email contact@adepoco.com.
Account-level chains
Receipts made with no workspace go to your account-level chain, account:<accountId> (you see it in receipt.workspaceId). It is included when you leave workspaceId out, if your plan allows a summary export. An export only ever holds your own chains.
No SDK or CLI command
There is no export command in the SDK or CLI. Use the HTTP call above.
Bundle fields
bundleVersion, generatedAt, workspaceId, auditLevel, genesis, chainHead, chainIntact, jwks, and receipts (each with receipt and publicVerdict, plus input and output at full).
Errors
- 403
Workspace audit level does not allow export(AUDIT_LEVEL), also when you leaveworkspaceIdout and none of your chains allows export - 404
Workspace not found, also for anaccount:id inworkspaceId