Generate an AI Safety Report
POST/v1/api/safety/ai-reports/generate
Runs the full generation pipeline for a confirmed report scope: queries and
aggregates the scoped incident data, calls the agent service for the narrative
content, merges the two into a single self-contained document, and persists the
result to history. Used for both first-time generation and regeneration (pass
regenerated_from_id to link lineage) — both are the same pipeline.
Auth Required
Required Permissions:
compliance.ai-reports:execute("AI Report Generation")
Request
Responses
- 200
- 400
- 401
- 403
- 500
Report generated successfully
Bad Request. The request was invalid or cannot be otherwise served.
Unauthorized. User is not authenticated or session is invalid.
Forbidden. User does not have the required permissions.
Internal Server Error