Get a single scan's status and detail
const url = 'https://zkao.io/api/v1/projects/example/scans/example';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/example \ --header 'Authorization: Bearer <token>'Requires scope: read. Use for polling a launched scan. While the scan is not yet terminal the response carries an advisory Retry-After header telling you how long to wait before polling again; respect it (and back off on 429) instead of polling in a tight loop.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”OK
object
object
A diff scan’s base, as the merge base SHA its change is measured from. Null for other scans.
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
Phases that reached a terminal state (completed, failed, or skipped).
Phases this scan will run, fixed when it was dispatched.
Weighted completion. Each phase counts for its share of the scan budget, so this does not simply equal phasesCompleted / phasesTotal.
Reserved budget for the scan, in credits.
object
object
Example
{ "scan": { "status": "QUEUED" }}Headers
Section titled “Headers”Advisory seconds to wait before polling again. Present only while the scan is still running (not for terminal scans).
Missing, malformed, expired, or revoked token
object
object
Example
{ "error": { "code": "unauthorized" }}The token lacks the required scope
object
object
Example
{ "error": { "code": "unauthorized" }}Resource not in this token’s project or repo allowlist
object
object
Example
{ "error": { "code": "unauthorized" }}Rate limited. Either the token’s spend limit for the current period is reached (on launch), or the token is sending too many requests. Wait the number of seconds in the Retry-After header before retrying.
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Seconds to wait before retrying.

