Compliance Reports
Generate async audit-ready compliance reports (GDPR Overview, DSR Summary, Consent Audit, Retention Analysis, Data Inventory Export).
Compliance Reports are asynchronously generated documents that provide audit-ready summaries of your compliance posture. Reports are generated in the background and stored for download once ready, supporting regulatory inspections, internal audits, and executive reporting.
Report Generation Process
Background report compilation pipeline compiling data from across all compliance sub-systems into standardized export formats.
| Report Type | Scope & Description | Intended Audience |
|---|---|---|
| GDPR Overview | Comprehensive audit snapshot covering consent, DSR volume, and inventory status. | Data Protection Officers, regulatory authorities, external audit teams. |
| DSR Summary | Statistical breakdown of submitted, fulfilled, and overdue data subject requests. | Privacy compliance managers, legal counsel, customer experience leads. |
| Consent Audit | Detailed chronological log of user consent events, purposes, and withdrawals. | Privacy regulators, internal audit committees, security officers. |
| Retention Log | Enforcement audit trail detailing purged records, anonymizations, and execution timestamps. | Systems administrators, database compliance auditors, data controllers. |
| Data Inventory | Article 30 Records of Processing Activities cataloging all mapped personal data. | Supervisory authorities, corporate compliance officers, risk analysts. |
Asynchronous Generation
Reports are generated asynchronously to avoid blocking HTTP requests for large datasets. When you request a report, the system immediately creates a ComplianceReport record with IsReady=false and queues the generation job. Poll the reports list to check when IsReady becomes true.
Report Generation Command
Dispatching report compilation jobs with custom date ranges, regulation profile filters, and output format specifications.
public class GenerateReportCommandHandler : ICommandHandler<GenerateReportCommand, Guid>
{
public async Task<Result<Guid>> Handle(GenerateReportCommand request, CancellationToken ct)
{
// 1. Create pending report record
var report = new ComplianceReport
{
TenantId = _tenantContext.TenantId,
ReportType = request.ReportType,
Title = $"Compliance Report - {request.ReportType}",
Status = ReportStatus.Pending
};
await _repository.AddAsync(report, ct);
await _unitOfWork.SaveChangesAsync(ct);
// 2. Queue background job
BackgroundJob.Enqueue<IReportGeneratorJob>(x => x.GenerateAsync(report.Id, ct));
return Result<Guid>.Success(report.Id);
}
}API Endpoints
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/v1/compliance/reports/generate | Enqueue an asynchronous compliance audit report generation job. | 🔒 Required |
| GET | /api/v1/compliance/reports | List all generated compliance reports and pending export jobs. | 🔒 Required |
| GET | /api/v1/compliance/reports/{id} | Retrieve metadata, execution status, and download eligibility for a report. | 🔒 Required |
| GET | /api/v1/compliance/reports/{id}/download | Securely download the generated compliance report archive. | 🔒 Required |