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.
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.
{
"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.
{
"success": true,
"data": {
"id": "9d2e4f6a-…",
"status": "complete",
"durationSeconds": 272,
"findingCount": 6,
"findingsBySeverity": { "critical": 0, "high": 1, "medium": 3, "low": 2 }
}
}| Field | Values |
|---|---|
status | queued, running, complete or failed |
findingsBySeverity | Counts for this scan |
progress | While 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#
| Status | When |
|---|---|
| 401 | Missing, expired or revoked token |
| 402 | Monthly scans used up, or no API access on your plan |
| 403 | Token belongs to another project, or the domain isn't verified |
| 404 | Scan not found |
| 409 | A scan is already running for this project |
| 429 | Rate limit reached |
