Enqueue asynchronous audit report generation. options.preset picks a known preset (GET /audit/reports/presets). Options.sections and the target filters customise it. options.format picks the file: pdf (default), csv (a ZIP archive with one CSV file per table) or json (one file with the principal.audit_report schema). Every format holds the same data. An unknown preset, section, target kind or format is refused with 400. Sections that show the current targets and access (the requires list of each section in GET /audit/reports/presets) also need targets:read and identities:read. Without them the request is refused with 403 before anything is queued, and details.sections names the refused sections and details.missing_permissions the missing permissions.
Starts a PDF, CSV or JSON report (202). Download when ready via GET /audit.
Request body application/json · CreateAuditReportRequest
17 fields
Start of the period (RFC 3339). Without it the report covers the default period of the preset (default_period_days) back from to. A period longer than 1098 days is refused with 400.
End of the period (RFC 3339). Without it, or when it is in the future, the report ends now.
Limit the report to these targets. Targets of other organizations are ignored.
Limit the report to targets of these kinds.
postgresmysqlclickhousemongodbkubernetessshapplication20 fields
Accepted and ignored.
v2A preset id from GET /audit/reports/presets: executive, access_review, privileged_access, leavers, change_management, security_events, drift, access_activity, iso27001, soc2 or pci_dss. Another value is refused with 400. Default: executive.
The report file: pdf, csv (a ZIP archive with one CSV file per table) or json (one file with the principal.audit_report schema). Another value is refused with 400 and a sentence that names the formats. Default: pdf.
The report title on the cover. The preset title when empty.
Section ids from GET /audit/reports/presets in any order. The report keeps the catalog order. The preset sections when empty. An unknown id is refused with 400.
Accepted and ignored.
exceptionsfullThe most rows in the refused and failed actions and the activity by area tables. Default: 150.
false leaves the full timeline section out of the report. true adds it to the preset sections when sections is empty. Use sections instead.
The most events in the full timeline section. 0 leaves the section out. Sent without sections, a value above 0 adds the section to the preset sections. Default: 1000.
Accepted and ignored.
aggregatedrawHow strictly the report rates risk. Default: balanced.
strictbalancedlenientShow internal ids next to names. Default: false.
false leaves the refused, failed and sensitive actions section out of the report. Use sections instead.
false leaves the targets section out of the report. Use sections instead.
false leaves the most frequent events section out of the report. true adds it to the preset sections when sections is empty. Use sections instead.
false leaves the methodology section out of the report. Use sections instead.
Takes precedence over show_internal_identifiers, as before. Use show_internal_identifiers instead.
Shorten every IP address and network in the report to its /16 (IPv4) or /48 (IPv6) network and replace the host in URLs and in user@host:port endpoints with hidden. Default: true.
The older name of appendix_timeline_limit. Takes precedence over it, as before. Values below 0 count as 0 and values above 5000 as 5000.
The most rows in the most frequent events table. Sent without sections, it adds that section to the preset sections. Default: 25.
Responses
Accepted
CreateAuditReportResponse · 5 fields
Whether this operation has finished.
Final operation result, or null while the operation is active.
successfailurecancelledpartialQualifies the status and outcome of an operation where they alone would hide what the operator must know. Null when none applies.
rollback_in_progress rolled_back needs_repair outcome_unknown interruptedrequires_approval holds_lock awaiting_confirmation expiredtimed_out rescheduledWhere a background operation is in the shared lifecycle (decision S1). outcome says how a finished operation ended and substate qualifies the state.
queuedrunningfinishedCommon errors: 400 401 403 409 413 429 500 503 504. They mean the same for every operation, see Errors.