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 (typically a few minutes).
warning
Needs a connected source repo (Settings → Source Code). 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project | path | string | yes | The project's public id. |
- cURL
- CLI
- MCP
curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/coverage/scan"
testvibe coverage scan --wait
Tool scan_coverage — optional project. Poll get_coverage until scan.status leaves running.
Response
202 Accepted
{ "scanId": 88, "requestId": "9f3c…", "status": "running" }
Poll get_coverage until scan.status is succeeded or failed.
Errors
| HTTP | When |
|---|---|
404 not_found | No such project in this workspace. |
409 conflict | A scan is already running, or no source repository is connected. |