cURL
curl --request POST \ --url https://api.example.com/api/repos/{id}/scan
{ "success": true, "data": { "id": "<string>", "repo_id": "<string>", "scan_type": "<string>", "status": "<string>", "triggered_by": "<string>", "commit_sha": "<string>", "base_commit_sha": "<string>", "parent_scan_id": "<string>", "finding_count": 123, "critical_count": 123, "high_count": 123, "medium_count": 123, "low_count": 123, "started_at": {}, "completed_at": {}, "error_message": "<string>", "created_at": {}, "updated_at": {} }, "error": { "success": true, "code": 123, "message": "<string>" } }
Initiate a security scan on a repository
queued
Show Scan Object
full
ingesting
ingested
modeling
modeled
static_analysis
hunting
hunted
validating
validated
reporting
completed
failed
cancelled
0
curl -X POST https://api.heimdall.example.com/api/repos/01936d2f-8c4e-7890-b123-456789abcdef/scan \ -H "Cookie: session=your_session_token"
{ "success": true, "data": { "id": "01936d30-abcd-1234-5678-90abcdef1234", "repo_id": "01936d2f-8c4e-7890-b123-456789abcdef", "scan_type": "full", "status": "queued", "triggered_by": "01936d2e-1234-5678-9abc-def012345678", "commit_sha": null, "base_commit_sha": null, "parent_scan_id": null, "finding_count": 0, "critical_count": 0, "high_count": 0, "medium_count": 0, "low_count": 0, "started_at": null, "completed_at": null, "error_message": null, "created_at": "2026-03-12T16:20:00Z", "updated_at": "2026-03-12T16:20:00Z" } }
Show Error Object
false
{ "success": false, "code": 401, "message": "Authentication required" }
{ "success": false, "code": 404, "message": "Repo '01936d2f-8c4e-7890-b123-456789abcdef' not found" }
{ "success": false, "code": 500, "message": "Failed to create scan: database connection error" }
{ "success": false, "code": 503, "message": "AI service unavailable. Please configure your API keys." }
scan_id
HX-Request
HX-Redirect
/scans/{scan_id}