List scans (most recent first)
GET
/projects/{projectId}/scans
const url = 'https://zkao.io/api/v1/projects/example/scans?page=1&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://zkao.io/api/v1/projects/example/scans?page=1&limit=50' \ --header 'Authorization: Bearer <token>'Requires scope: read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”projectId
required
string
Query Parameters
Section titled “Query Parameters”page
integer
limit
integer
Responses
Section titled “ Responses ”OK
Media typeapplication/json
object
items
required
Array<object>
object
id
required
string
status
required
string
repositoryId
required
string
commitHash
string | null
baseCommit
A diff scan’s base, as the merge base SHA its change is measured from. Null for other scans.
string | null
commitMessage
string | null
presetName
string | null
createdAt
required
string format: date-time
startedAt
string | null format: date-time
completedAt
string | null format: date-time
progress
One of:
How far a running scan has got through its phases. Deliberately not a time estimate: a phase’s duration moves with the guidance it was given, the repository, and the model that ran it.
object
phasesCompleted
required
Phases that reached a terminal state (completed, failed, or skipped).
integer
phasesTotal
required
Phases this scan will run, fixed when it was dispatched.
integer
percent
required
Weighted completion. Each phase counts for its share of the scan budget, so this does not simply equal phasesCompleted / phasesTotal.
integer
null
page
required
integer
limit
required
integer
total
required
integer
Example
{ "items": [ { "status": "QUEUED" } ]}Missing, malformed, expired, or revoked token
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}The token lacks the required scope
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}Resource not in this token’s project or repo allowlist
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}
