Reports API
The Reports API allows you to generate and retrieve penetration test reports in various formats.
Generate Report
Generate a new report for a completed scan.
Request Body
The ID of the completed scan
Report format: pdf, html, json, docx
template
string
default:"technical"
Report template: executive, technical, compliance, developer
Compliance frameworks to include: soc2, iso27001, pci, hipaa, gdpr
Additional report options
Request
{
"scan_id": "scan_abc123",
"format": "pdf",
"template": "technical",
"compliance": ["soc2", "pci"],
"options": {
"include_remediation": true,
"include_poc": true,
"executive_summary": true,
"company_name": "Acme Corp",
"logo_url": "https://example.com/logo.png"
}
}
Response
{
"success": true,
"data": {
"id": "report_xyz789",
"scan_id": "scan_abc123",
"format": "pdf",
"template": "technical",
"status": "generating",
"created_at": "2024-01-15T14:00:00Z",
"estimated_completion": "2024-01-15T14:05:00Z"
}
}
List Reports
Retrieve a list of generated reports.
Query Parameters
| Parameter | Type | Description |
|---|
scan_id | string | Filter by scan ID |
format | string | Filter by format |
template | string | Filter by template |
page | integer | Page number |
limit | integer | Results per page |
Response
{
"success": true,
"data": [
{
"id": "report_xyz789",
"scan_id": "scan_abc123",
"format": "pdf",
"template": "technical",
"status": "completed",
"file_size": 2456789,
"created_at": "2024-01-15T14:00:00Z",
"expires_at": "2024-02-15T14:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 15
}
}
Get Report
Retrieve details about a specific report.
GET /v1/reports/{report_id}
Response
{
"success": true,
"data": {
"id": "report_xyz789",
"scan_id": "scan_abc123",
"format": "pdf",
"template": "technical",
"status": "completed",
"compliance": ["soc2", "pci"],
"file_size": 2456789,
"download_url": "https://api.aiptx.io/v1/reports/report_xyz789/download",
"summary": {
"target": "https://app.example.com",
"scan_date": "2024-01-15",
"findings_total": 42,
"findings_critical": 2,
"findings_high": 5,
"risk_score": 78
},
"created_at": "2024-01-15T14:00:00Z",
"expires_at": "2024-02-15T14:00:00Z"
}
}
Download Report
Download the report file.
GET /v1/reports/{report_id}/download
Response
Returns the binary file with appropriate Content-Type header:
- PDF:
application/pdf
- HTML:
text/html
- JSON:
application/json
- DOCX:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Example
curl -X GET "https://api.aiptx.io/v1/reports/report_xyz789/download" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o security_report.pdf
Report Templates
Executive Template
Designed for non-technical stakeholders:
- High-level risk summary
- Business impact assessment
- Key findings overview
- Trend analysis
- Strategic recommendations
Technical Template
Comprehensive technical documentation:
- Detailed vulnerability descriptions
- Proof-of-concept code
- Request/response evidence
- CVSS scoring breakdown
- Step-by-step remediation
Compliance Template
Focused on regulatory requirements:
- Control mapping
- Gap analysis
- Evidence collection
- Audit trail
- Compliance status dashboard
Developer Template
Optimized for development teams:
- Code-level details
- File and line references
- Fix code examples
- Integration with issue trackers
- CI/CD pipeline recommendations
Custom Branding
Enterprise customers can customize report branding:
POST /v1/reports/branding
Request
{
"company_name": "Acme Corporation",
"logo_url": "https://example.com/logo.png",
"primary_color": "#1a73e8",
"footer_text": "Confidential - For Internal Use Only",
"contact_email": "[email protected]"
}
Scheduled Reports
Configure automated report generation:
POST /v1/reports/schedules
Request
{
"scan_id": "scan_abc123",
"format": "pdf",
"template": "executive",
"schedule": {
"frequency": "weekly",
"day": "monday",
"time": "09:00",
"timezone": "America/New_York"
},
"delivery": {
"email": ["[email protected]", "[email protected]"],
"slack_channel": "#security-reports"
}
}
Share Report
Generate a shareable link for a report.
POST /v1/reports/{report_id}/share
Request
{
"expires_in": "7d",
"password_protected": true,
"allowed_domains": ["@acme.com"]
}
Response
{
"success": true,
"data": {
"share_url": "https://reports.aiptx.io/s/abc123xyz",
"password": "SecurePass123",
"expires_at": "2024-01-22T14:00:00Z"
}
}