Skip to main content

Reports API

Infracast generates compliance reports, evidence packages, and security documents in multiple formats. Reports can be generated on-demand or scheduled for automatic delivery. The Document Generation engine (Build 25) supports professional formats including signed PDFs, Word documents, and government-standard deliverables.


Endpoints

MethodPathDescriptionPermission
POST/api/v1/tenants/{tenantID}/reports/generateGenerate a reportfindings:read
GET/api/v1/tenants/{tenantID}/reportsList generated reportsfindings:read
POST/api/v1/tenants/{tenantID}/reports/pdfDownload PDF directlyfindings:read
POST/api/v1/tenants/{tenantID}/documents/generateGenerate formal documentsfindings:read
GET/api/v1/tenants/{tenantID}/documentsList generated documentsfindings:read
GET/api/v1/tenants/{tenantID}/documents/{documentID}Get document metadatafindings:read
GET/api/v1/tenants/{tenantID}/documents/{documentID}/downloadDownload documentfindings:read
GET/api/v1/documents/typesList available document typesfindings:read
POST/api/v1/reports/verifyVerify a signed reportNone (public)

Generate a Report

POST /api/v1/tenants/{tenantID}/reports/generate

Request Body

{
"type": "framework",
"framework": "nist-800-53",
"format": "pdf",
"options": {
"include_remediation": true,
"include_evidence": false,
"severity_filter": ["CRITICAL", "HIGH", "MEDIUM"],
"title": "NIST 800-53 Compliance Report — Q1 2024"
}
}

Report Types

TypeDescriptionAudience
frameworkFull control-by-control status for a compliance frameworkAuditors, compliance team
executiveHigh-level posture, trends, top risks, score over timeLeadership, board
gapControls failing or unattested, with prioritized remediationSecurity engineering
remediationPrioritized finding list grouped by owner/teamEngineering teams
poamPlan of Action and Milestones (FedRAMP/federal format)Federal compliance
evidenceTimestamped evidence bundle for a framework and time window3PAOs, auditors

Export Formats

FormatDescriptionUse Case
pdfFormatted PDF (signed, tamper-evident)Sharing, archiving, auditors
docxMicrosoft Word documentEditing, SSP authoring
xlsxExcel spreadsheetData analysis, POA&M tracking
jsonMachine-readable JSONAPI/automation integration
mdMarkdownDeveloper-friendly, Git storage

Example Request

# Generate a PDF compliance report for PCI DSS
curl -X POST https://api.infracast.io/api/v1/tenants/acme-corp/reports/generate \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "framework",
"framework": "pci-dss",
"format": "pdf",
"options": {
"include_remediation": true,
"title": "PCI DSS v4.0 Compliance Report — March 2024",
"company_name": "Acme Corp",
"logo_url": "https://acme.com/logo.png"
}
}'

Response

{
"report_id": "rpt-abc123def456",
"type": "framework",
"framework": "pci-dss",
"format": "pdf",
"status": "generating",
"created_at": "2024-03-16T10:00:00Z"
}

Reports are generated asynchronously. Poll the list endpoint or use webhooks to be notified when ready.


Download a PDF Report

For immediate, synchronous PDF generation (blocks until complete):

POST /api/v1/tenants/{tenantID}/reports/pdf
Content-Type: application/json

{
"type": "executive",
"format": "pdf"
}

Response is the raw PDF binary (Content-Type: application/pdf).


List Reports

GET /api/v1/tenants/{tenantID}/reports?per_page=20&sort=-created_at
{
"items": [
{
"id": "rpt-abc123",
"type": "framework",
"framework": "pci-dss",
"format": "pdf",
"status": "completed",
"size_bytes": 2847392,
"download_url": "https://api.infracast.io/api/v1/tenants/acme-corp/reports/rpt-abc123/download",
"download_expires": "2024-03-23T10:00:00Z",
"created_at": "2024-03-16T10:00:00Z",
"completed_at": "2024-03-16T10:00:45Z"
}
],
"total": 24
}

Document Generation (Build 46)

The Document Generation API produces professional-grade, government-standard documents such as System Security Plans (SSPs), POA&Ms, and architecture diagrams:

List Document Types

GET /api/v1/documents/types
{
"types": [
{
"id": "ssp",
"name": "System Security Plan",
"description": "NIST/FedRAMP/FISMA System Security Plan with control implementation statements",
"frameworks": ["nist-800-53", "fedramp-moderate", "fedramp-high"],
"formats": ["docx", "pdf"]
},
{
"id": "poam",
"name": "Plan of Action & Milestones",
"description": "FedRAMP-formatted POA&M export from open findings",
"frameworks": ["fedramp-moderate", "fedramp-high", "nist-800-53"],
"formats": ["xlsx", "pdf"]
},
{
"id": "sar",
"name": "Security Assessment Report",
"description": "Full assessment report with findings, risk levels, and recommendations",
"frameworks": ["nist-800-53", "fedramp-high"],
"formats": ["docx", "pdf"]
},
{
"id": "architecture-diagram",
"name": "Architecture Diagram",
"description": "Auto-generated network architecture diagram from infrastructure graph",
"formats": ["pdf", "png", "svg"]
}
]
}

Generate an SSP

POST /api/v1/tenants/{tenantID}/documents/generate
{
"type": "ssp",
"framework": "fedramp-high",
"format": "docx",
"options": {
"include_architecture_diagram": true,
"impact_level": "high",
"csp_name": "Acme Cloud Services LLC",
"system_name": "Acme Government Cloud Platform",
"system_id": "AGC-2024-001",
"cover_page": true,
"organization_logo": "https://acme.com/logo.png"
}
}

Generate a POA&M

POST /api/v1/tenants/{tenantID}/documents/generate
{
"type": "poam",
"framework": "fedramp-high",
"format": "xlsx",
"options": {
"include_closed": false,
"include_risk_accepted": true,
"month": "2024-03"
}
}

Download a Document

GET /api/v1/tenants/{tenantID}/documents/{documentID}/download

Returns the document binary with appropriate Content-Type header.


Signed PDF Reports (Build 46)

Infracast generates cryptographically signed PDFs to ensure report authenticity and tamper-evidence:

POST /api/v1/tenants/{tenantID}/reports/generate
{
"type": "framework",
"framework": "soc2",
"format": "pdf",
"options": {
"signed": true,
"signer": "compliance@acme.com"
}
}

The signed PDF includes:

  • Digital signature embedded in the PDF
  • Certificate chain for signature verification
  • Timestamp authority (TSA) timestamp
  • Report hash for independent verification

Verify a Signed Report

Any party can verify a signed report without an Infracast account:

POST https://api.infracast.io/api/v1/reports/verify
Content-Type: multipart/form-data

file=@compliance-report-2024-03.pdf
{
"valid": true,
"signed_by": "compliance@acme.com",
"signed_at": "2024-03-16T10:00:45Z",
"tenant": "Acme Corp",
"framework": "soc2",
"generated_at": "2024-03-16T10:00:00Z",
"tampered": false
}

Schedule Reports

Automate report delivery on a recurring schedule:

POST /api/v1/tenants/{tenantID}/reports/schedule
{
"name": "Weekly Security Executive Summary",
"type": "executive",
"format": "pdf",
"frequency": "weekly",
"day": "monday",
"time": "07:00",
"timezone": "America/New_York",
"recipients": [
"ciso@company.com",
"security-board@company.com"
],
"options": {
"signed": true,
"include_trends": true
}
}

List Schedules

GET /api/v1/tenants/{tenantID}/reports/schedules

Report History

GET /api/v1/tenants/{tenantID}/reports/history?per_page=30

Professional Format Options (Build 46)

The options field in report and document generation supports professional formatting:

OptionTypeDescription
titlestringCustom report title
company_namestringOrganization name on cover page
organization_logostringURL to logo image (PNG/SVG)
cover_pagebooleanInclude formatted cover page
table_of_contentsbooleanAuto-generated TOC
include_architecture_diagrambooleanInclude auto-generated network diagram
include_remediationbooleanInclude remediation steps per finding
include_evidencebooleanInclude evidence artifact summary
severity_filterarrayOnly include findings of these severities
signedbooleanCryptographically sign the PDF
watermarkstringAdd draft/confidential watermark text
classificationstringDocument classification marking (e.g., CUI, FOUO)

Python Example

from infracast import InfracastClient
import time

client = InfracastClient(api_url="https://api.infracast.io", api_token="your-token")

# Generate a NIST report
report = client.reports.generate(
tenant="acme-corp",
type="framework",
framework="nist-800-53",
format="pdf",
options={
"title": "Q1 2024 NIST Compliance Report",
"signed": True,
"include_remediation": True
}
)

# Wait for completion
while report.status == "generating":
time.sleep(5)
report = client.reports.get(tenant="acme-corp", report_id=report.id)

# Download
with open("nist-report-q1-2024.pdf", "wb") as f:
f.write(client.reports.download(tenant="acme-corp", report_id=report.id))

print(f"Report downloaded: {report.size_bytes / 1024:.0f} KB")

FAR/DFARS Compliance Reports

Infracast includes dedicated document generators for federal contracting compliance reports. These are formal, signed documents suitable for submission to Contracting Officers, DCSA, and DoD systems.

FAR 52.204-21 — Basic Safeguarding of Covered Contractor Information Systems

FAR 52.204-21 applies to all federal contractors (not just DoD) that handle Federal Contract Information (FCI). The clause mandates 15 basic safeguarding requirements derived from NIST 800-171.

POST /api/v1/tenants/{tenantID}/documents/generate
Content-Type: application/json

{
"type": "far-dfars-compliance",
"report_subtype": "far-52204-21",
"format": "pdf",
"options": {
"company_name": "Acme Contracting LLC",
"cage_code": "1A2B3",
"uei": "ABCD1234EFGH",
"contract_numbers": ["W912DR-24-C-0001"],
"assessment_date": "2026-04-24",
"signed": true,
"certifying_official": "Jane Smith, CISO"
}
}

Report contents:

  • Executive summary with overall compliance posture
  • Control-by-control status for all 15 FAR 52.204-21 requirements
  • Automated findings detail with evidence references
  • Risk acceptance and exception documentation
  • Signed attestation page for certifying official

DFARS 252.204-7012 — Safeguarding CDI + SPRS Score

DFARS 252.204-7012 applies to DoD contractors handling Covered Defense Information (CDI). It requires full NIST 800-171 compliance and mandates self-reporting your SPRS score.

POST /api/v1/tenants/{tenantID}/documents/generate
Content-Type: application/json

{
"type": "far-dfars-compliance",
"report_subtype": "dfars-252204-7012",
"format": "pdf",
"options": {
"company_name": "Acme Defense LLC",
"cage_code": "1A2B3",
"uei": "ABCD1234EFGH",
"contract_numbers": ["W912DR-24-D-0042"],
"assessment_date": "2026-04-24",
"include_sprs_score": true,
"include_poam": true,
"signed": true,
"certifying_official": "Jane Smith, CISO"
}
}

Report contents:

  • SPRS Score Summary — Calculated score with practice-level breakdown
  • NIST 800-171 Assessment Results — All 110 practices: automated + attested
  • POA&M — Open deficiencies with milestones and responsible parties
  • CDI Data Flow Summary — Systems in scope for CDI handling
  • Incident Reporting Procedures — Attestation of 72-hour DC3 reporting capability
  • Cloud Provider Compliance — Verification that CSPs meet FedRAMP Moderate or equivalent
  • Signed Attestation Page — Suitable for contracting officer submission

SPRS Score in API Responses

The SPRS score is also available directly from the compliance summary endpoint:

GET /api/v1/tenants/{tenantID}/compliance/summary?framework=nist-800-171

# Response
{
"framework": "nist-800-171",
"sprs_score": 94,
"sprs_max": 110,
"sprs_min_possible": -203,
"practices_passing": 104,
"practices_failing": 6,
"practices_attested": 12,
"practices_not_assessed": 0,
"failing_practices": [
{
"practice_id": "3.11.2",
"family": "RA",
"description": "Scan for vulnerabilities in systems periodically",
"point_value": -5,
"remediation": "Enable Amazon Inspector or equivalent vulnerability scanner"
}
],
"assessment_date": "2026-04-24T00:00:00Z"
}

Listing Available FAR/DFARS Report Types

GET /api/v1/documents/types?category=far-dfars

# Response
{
"types": [
{
"id": "far-52204-21",
"name": "FAR 52.204-21 Compliance Report",
"description": "Basic safeguarding attestation for all federal contractors handling FCI",
"applicable_to": "All federal contractors with FCI",
"formats": ["pdf", "docx"]
},
{
"id": "dfars-252204-7012",
"name": "DFARS 252.204-7012 Compliance Report",
"description": "CDI safeguarding report with NIST 800-171 assessment and SPRS score for DoD contractors",
"applicable_to": "DoD contractors handling CDI",
"formats": ["pdf", "docx"]
}
]
}
When to Use Which Report
  • FAR 52.204-21 only: Contracts with civilian federal agencies (GSA, HHS, DHS) where you handle FCI but not CDI
  • DFARS 252.204-7012: All DoD contracts where CDI is handled — includes NIST 800-171 + SPRS score requirement
  • Both: Some DoD contracts incorporate both FAR and DFARS clauses; generate both reports

Next Steps