VulnWatch REST API Reference
Programmatically trigger passive security posture assessments, list historical scan metrics, retrieve attack surface reconnaissance intelligence, and download compliance export deliverables (PDF, JSON, HTML).
POST
/api/scans
Trigger a single target audit
Request Parameters
| Field | Type | Status | Description |
|---|---|---|---|
| target_url | string | Required | Target hostname or URL to audit (e.g. https://example.com). |
| authorized | boolean | Required | Explicit confirmation that you are authorized to audit this target (true). |
Initiates passive security header compliance, cookie flag auditing, HTTP method checks, and Certificate Transparency recon.
cURL Example
curl -X POST http://127.0.0.1:5000/api/scans \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://example.com",
"authorized": true
}'
Response (201 Created)
{
"id": 14,
"target_url": "https://example.com",
"status": "COMPLETED",
"posture_score": 85,
"critical_count": 0,
"high_count": 1,
"medium_count": 2,
"low_count": 1,
"started_at": "2026-09-17 17:00:00"
}
GET
/api/scans
List historical audits & metrics
Query Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| limit | integer | Optional | Maximum scan records to return (default: all). |
| offset | integer | Optional | Pagination offset index. |
| status | string | Optional | Filter by scan state: COMPLETED, RUNNING, FAILED. |
cURL Example
curl -X GET "http://127.0.0.1:5000/api/scans?limit=10&status=COMPLETED"
Response (200 OK)
[
{
"id": 14,
"target_url": "https://example.com",
"status": "COMPLETED",
"posture_score": 85,
"high_count": 1,
"medium_count": 2,
"started_at": "2026-09-17 17:00:00"
}
]
GET
/api/scans/{id}
Fetch findings & passive recon intelligence
Path Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| id | integer | Required | Unique database identifier of target scan. |
Returns full audit details including findings, CVSS v3.1 vectors, remediation guidance, tech stack fingerprints, SPF/DMARC posture, and CT subdomains.
cURL Example
curl -X GET http://127.0.0.1:5000/api/scans/14
Response (200 OK)
{
"id": 14,
"target_url": "https://example.com",
"status": "COMPLETED",
"posture_score": 85,
"findings": [
{
"id": 102,
"title": "Missing Content-Security-Policy",
"severity": "HIGH",
"cvss_score": 7.5,
"cwe_id": "CWE-693"
}
],
"reconnaissance": {
"subdomains_discovered": ["api.example.com", "dev.example.com"],
"dns_email_security": {"spf_detected": true, "dmarc_detected": false}
}
}
POST
/api/scans/batch
Trigger multi-target batch audit
Request Body Schema
| Field | Type | Status | Description |
|---|---|---|---|
| targets | array[string] | Required | List of target URLs to audit sequentially. |
| authorized | boolean | Required | Explicit confirmation of authorization (true). |
cURL Example
curl -X POST http://127.0.0.1:5000/api/scans/batch \
-H "Content-Type: application/json" \
-d '{
"targets": ["https://site1.com", "https://site2.com"],
"authorized": true
}'
Response (200 OK)
{
"batch_count": 2,
"redirect_url": "/scanner/batch/results?ids=14,15",
"scans": [
{"id": 14, "target_url": "https://site1.com"},
{"id": 15, "target_url": "https://site2.com"}
]
}
GET
/export/{format}/{scan_id}
Download compliance report deliverables
Available Export Formats
| Format Route | MIME Type | Description |
|---|---|---|
| /export/pdf/{id} | application/pdf |
Executive multi-page PDF compliance document. |
| /export/json/{id} | application/json |
Full machine-readable JSON object with findings & recon. |
| /export/html/{id} | text/html |
Standalone self-contained HTML audit report. |
cURL Download Example
# Download Executive PDF Report
curl -O http://127.0.0.1:5000/export/pdf/14
# Download Machine-Readable JSON Export
curl -O http://127.0.0.1:5000/export/json/14
DELETE
/api/scan/{id}
Delete scan record
Path Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| id | integer | Required | ID of audit record to delete. |
cURL Example
curl -X DELETE http://127.0.0.1:5000/api/scan/14
Response (200 OK)
{
"message": "Scan #14 deleted successfully."
}