Skip to content

Connect

CI API reference

The three endpoints your pipeline uses to start scans and read results.

Use a project CI token as a bearer token. Every path starts with /v1, under the API URL shown in Project settings → CI/CD tokens.

HTTP
Authorization: Bearer ag_ci_9f3c2b1a…

Successful responses put the result in data. Errors include a statusCode and a message that says what went wrong.

Start a scan#

POST/v1/ci/projects/{projectId}/scans

No request body. Returns 201 with the scan, including its id. Limit: 60 per hour per token.

JSON
{
  "success": true,
  "data": { "id": "9d2e4f6a-…", "status": "queued", "findingCount": 0 }
}

Get a scan#

GET/v1/ci/scans/{scanId}

Poll every 15 to 30 seconds. Limit: 300 per hour per token.

JSON
{
  "success": true,
  "data": {
    "id": "9d2e4f6a-…",
    "status": "complete",
    "durationSeconds": 272,
    "findingCount": 6,
    "findingsBySeverity": { "critical": 0, "high": 1, "medium": 3, "low": 2 }
  }
}
FieldValues
statusqueued, running, complete or failed
findingsBySeverityCounts for this scan
progressWhile running: how far through the scan it is

Get results as SARIF#

GET/v1/ci/scans/{scanId}/sarif

The SARIF log is in data. Fetch it after the scan completes. Limit: 30 per hour per token.

Errors#

StatusWhen
401Missing, expired or revoked token
402Monthly scans used up, or no API access on your plan
403Token belongs to another project, or the domain isn't verified
404Scan not found
409A scan is already running for this project
429Rate limit reached