Export audit records as evidence
Every stored audit record in a range of at most 366 days, oldest first, as one JSON document (anlyon.audit.export.v1) or CSV, streamed as an attachment. Filter by environment, event type, category or governed action. Taking an export is itself recorded (audit.export.created) before any record is sent. Records older than the hot window are read back from the audit archive, checked against their checksums, and included in the same order; 503 AUDIT_ARCHIVE_UNAVAILABLE when the range holds archived records this server cannot reach, and the stream stops with AUDIT_ARCHIVE_INTEGRITY rather than leave out a record whose archived copy fails its check. Enterprise edition and Team plan. Needs audit:read.
/api/v2/audit/exportAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
fromstring<date-time>requiredtostring<date-time>requiredformatstringjsoncsvenvironmentIdstring<uuid>typestringcategoryAuditCategoryapprovalinvocationpolicyactionaccessenvironmentconnectionlimitauditactionstringendUserIdstringX-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
Streamed attachment of every matching record, oldest first.
schemastringrequiredanlyon.audit.export.v1generatedAtstring<date-time>requiredworkspaceIdstring<uuid>requiredfiltersobjectrequiredeventsAuditEvent[]requiredShow propertiesHide properties
AuditEventschemastringrequiredanlyon.audit.v1idstringrequiredsequenceintegerrequiredtypestringrequiredcategoryAuditCategoryrequiredapprovalinvocationpolicyactionaccessenvironmentconnectionlimitauditoccurredAtstring<date-time>requiredworkspaceIdstring<uuid>requiredenvironmentIdstring<uuid> | nullrequiredNull for workspace-level records such as members and keys.
actorAuditActorrequiredShow propertiesHide properties
typestringrequireduserapi_keyoauth_clientassistantpolicysystemidstring | nullrequiredUser id
onBehalfOfstring | nullFor an OAuth client
resourceobject | nullrequiredShow propertiesHide properties
typestringrequiredidstringrequiredoutcomestring | nullrequireddataobjectrequiredType-specific detail. Invocation records carry a receipt; approval records carry the policy decision.
contextobject | nullrequiredShow propertiesHide properties
requestIdstringipstringuserAgentstringtestbooleanPresent only on a test event.
truebackfilledbooleanPresent only on a record created from history by the one-time backfill
trueendUserIdstringPresent only on a record of an act for one of your end users. erased~<hash> once that end user is erased.
countintegerrequiredBad Request - Invalid input data
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Unauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Authenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Not Found - Resource does not exist
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Too Many Requests - Rate limit exceeded. A workspace's API requests are limited per minute and per UTC clock hour by plan; Retry-After says when to try again, and an hourly refusal names the limit and when the count resets. Successful responses carry the same limits in X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (the minute) and X-RateLimit-Limit-Hour, X-RateLimit-Remaining-Hour, X-RateLimit-Reset-Hour (the hour).
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
A required provider or platform dependency is not configured or available.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.

