Skip to main content

scan_coverage

Start an AI coverage scan: it reads the connected source repository, enumerates source files, and derives the application's user-facing areas (framework-agnostic). Returns immediately; the scan runs in the background (duration depends on repository size and scan work).

warning

Needs a connected source repo (Settings → App Repository). Rejected with 409 conflict if a scan is already running, or if no repository is connected.

Request​

POST /api/v1/ops/projects/{project}/coverage/scan
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/coverage/scan"

Response​

202 Accepted

{ "scanId": 88, "requestId": "9f3c…", "status": "running" }

Poll get_coverage until scan.status is succeeded or failed. A missing status is not an outcome — keep polling.

testvibe coverage scan --wait polls for you, bounded by --timeout <seconds> (default 5400; 0 waits indefinitely; env TESTVIBE_WAIT_TIMEOUT_SECONDS). A wait that ends before the scan does exits 3 — no verdict — not 1. See the CLI wait contract.

Errors​

HTTPWhen
404 not_foundNo such project in this workspace.
409 conflictA scan is already running, or no source repository is connected.