The scans endpoint lets you browse the history of Detail analysis runs for a repository. Each scan record tells you when the analysis ran, what commit it covered, how it was triggered, and how many bugs it found. You can also use a scan’s workflowRequestId to filter bug results to only those surfaced during that specific scan.
GET /public/v1/scans
Returns a paginated list of scans for a repository, ordered newest first.
curl "https://api.detail.dev/public/v1/scans?repo_id=repo_abc123" \
-H "Authorization: Bearer dtl_live_YOUR_KEY"
Query parameters
The repository ID to fetch scans for. Repository IDs are prefixed with repo_ and are returned by GET /public/v1/repos . Example: repo_abc123.
Number of results to return. Between 1 and 100. Defaults to 50.
Number of results to skip for pagination. Defaults to 0.
Response
Array of scan objects for the repository. Unique identifier for the scan, prefixed with wr_. Pass this as workflow_request_id when querying GET /public/v1/bugs to scope results to this scan. ID of the repository that was scanned.
Short name of the repository (without owner prefix).
GitHub owner (user or organization) of the repository.
Current status of the scan. One of:
in_progress — the scan is still running
complete — the scan finished successfully
failed — the scan encountered an error
dlq — the scan was moved to the dead-letter queue after repeated failures
The analysis mode used. One of:
default — full repository scan
recentChanges — analysis focused on recently changed code
What triggered the scan. One of:
scheduler — triggered automatically on a schedule
scanNow — triggered manually via the dashboard or CLI
The full commit SHA that the scan analysed.
Unix timestamp (milliseconds) when the scan was created.
Unix timestamp (milliseconds) when the scan completed. null if the scan is still in progress.
Breakdown of bug counts for this scan. null while the scan is in progress. Total number of bugs found.
Bugs with pending review state.
Bugs marked as dismissed.
Total number of scans for the repository, regardless of limit and offset.
Example response
{
"scans" : [
{
"workflowRequestId" : "wr_abc123" ,
"repoId" : "repo_xyz789" ,
"repoName" : "my-repo" ,
"ownerName" : "myorg" ,
"workflowStatus" : "complete" ,
"scanType" : "default" ,
"initiator" : "scheduler" ,
"commitSha" : "abc1234567890abcdef" ,
"createdAt" : 1736899200000 ,
"completedAt" : 1736899800000 ,
"bugCounts" : {
"total" : 5 ,
"open" : 3 ,
"resolved" : 1 ,
"dismissed" : 1
}
},
{
"workflowRequestId" : "wr_def456" ,
"repoId" : "repo_xyz789" ,
"repoName" : "my-repo" ,
"ownerName" : "myorg" ,
"workflowStatus" : "in_progress" ,
"scanType" : "recentChanges" ,
"initiator" : "scanNow" ,
"commitSha" : "def4567890abcdef12" ,
"createdAt" : 1737072000000 ,
"completedAt" : null ,
"bugCounts" : null
}
],
"total" : 8
}
To list the bugs surfaced by a specific scan, pass its workflowRequestId as the workflow_request_id parameter when calling GET /public/v1/bugs . curl "https://api.detail.dev/public/v1/bugs?repo_id=repo_xyz789&status=pending&workflow_request_id=wr_abc123" \
-H "Authorization: Bearer dtl_live_YOUR_KEY"