Skip to content

Reports API

Generate and download penetration test reports via the API.

MethodEndpointDescription
GET/reportsList generated reports
GET/reports/{id}Get report metadata
GET/reports/{id}/downloadDownload report file
POST/reports/generateGenerate new report
DELETE/reports/{id}Delete report
{
"id": "report_abc123",
"project_id": "proj_xyz789",
"name": "Q1 2024 Pentest Report",
"template_id": "template_default",
"format": "docx",
"status": "completed",
"file_size": 2548000,
"findings_count": 12,
"generated_by": "user_123",
"generated_at": "2024-01-30T15:00:00Z",
"download_url": "/reports/report_abc123/download"
}
GET /reports
ParameterTypeDescription
project_idstringFilter by project
pageintegerPage number
limitintegerItems per page
Terminal window
curl -X GET "https://{tenant}.nforged.com/api/v1/reports?project_id=proj_xyz789" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /reports/{id}
{
"success": true,
"data": {
"id": "report_abc123",
"project_id": "proj_xyz789",
"name": "Q1 2024 Pentest Report",
"status": "completed",
"generated_at": "2024-01-30T15:00:00Z"
}
}
POST /reports/generate
FieldTypeRequiredDescription
project_idstringYesProject to report on
template_idstringNoReport template ID
namestringNoCustom report name
include_findingsarrayNoSpecific finding IDs
severity_filterstringNoMinimum severity
optionsobjectNoReport options
{
"include_executive_summary": true,
"include_methodology": true,
"include_appendices": true,
"group_by": "severity",
"include_evidence": true
}
Terminal window
curl -X POST "https://{tenant}.nforged.com/api/v1/reports/generate" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_id": "proj_xyz789",
"template_id": "template_default",
"name": "Final Report - Q1 2024",
"severity_filter": "Medium",
"options": {
"include_executive_summary": true,
"group_by": "severity"
}
}'
{
"success": true,
"data": {
"id": "report_def456",
"status": "generating",
"estimated_time": 30
}
}

Reports generate asynchronously. Check status:

GET /reports/{id}

Status values:

  • queued - In queue
  • generating - Being created
  • completed - Ready to download
  • failed - Generation failed
GET /reports/{id}/download
Terminal window
curl -X GET "https://{tenant}.nforged.com/api/v1/reports/report_abc123/download" \
-H "Authorization: Bearer YOUR_TOKEN" \
--output report.docx

Returns the file directly with appropriate headers:

Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Content-Disposition: attachment; filename="report.docx"
DELETE /reports/{id}
Terminal window
curl -X DELETE "https://{tenant}.nforged.com/api/v1/reports/report_abc123" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /reports/templates
{
"success": true,
"data": [
{
"id": "template_default",
"name": "Default Template",
"description": "Standard pentest report"
},
{
"id": "template_executive",
"name": "Executive Summary",
"description": "Brief executive report"
}
]
}

Subscribe to report events:

  • report.generation.started
  • report.generation.completed
  • report.generation.failed

Webhook payload:

{
"event": "report.generation.completed",
"data": {
"report_id": "report_abc123",
"project_id": "proj_xyz789",
"download_url": "/reports/report_abc123/download"
}
}
  1. POST to /reports/generate
  2. Poll status or use webhooks
  3. Download when completed

If generation fails:

{
"success": true,
"data": {
"id": "report_abc123",
"status": "failed",
"error": "No findings to include"
}
}

Next: Explore Resources