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 TypeScope & DescriptionIntended Audience
GDPR OverviewComprehensive audit snapshot covering consent, DSR volume, and inventory status.Data Protection Officers, regulatory authorities, external audit teams.
DSR SummaryStatistical breakdown of submitted, fulfilled, and overdue data subject requests.Privacy compliance managers, legal counsel, customer experience leads.
Consent AuditDetailed chronological log of user consent events, purposes, and withdrawals.Privacy regulators, internal audit committees, security officers.
Retention LogEnforcement audit trail detailing purged records, anonymizations, and execution timestamps.Systems administrators, database compliance auditors, data controllers.
Data InventoryArticle 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.

Job Enqueued
Worker Execution
Report Generated
Secure Download

Report Generation Command

Dispatching report compilation jobs with custom date ranges, regulation profile filters, and output format specifications.

GenerateReportCommand.csC#
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

MethodEndpointDescriptionAuth
POST/api/v1/compliance/reports/generateEnqueue an asynchronous compliance audit report generation job.🔒 Required
GET/api/v1/compliance/reportsList 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}/downloadSecurely download the generated compliance report archive.🔒 Required