Syndai Docs

Turn a repository's weekly bug scan on or off

PUT
/api/v1/external/coding/repositories/{repository_id}/bug-scan

Turn the weekly bug scan on or off, and set its per-scan limit. Turning it on schedules a scan every Monday 07:00 in your timezone and starts a first scan of the repository's busiest areas now; turning it back on after turning it off resumes the schedule without a new scan. Turning it off pauses it and cancels a scan in progress. limit_usd (5 to 300, default 25) caps each scan: it checks the busiest changes that fit and stops there; GET shows what pays for the next scan. Idempotent.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Path Parameters

repository_id*string
Formatuuid

Query Parameters

customer_id?|null

Request Body

application/json
  1. body
enabled*boolean
limit_usd?|
Range5 <= value <= 300

Response Body

Request fulfilled, document follows

application/json
  1. response
enabled*boolean
free_scan_state?string
Default"used"
free_scan_usd*number
full_subscription?string|null
full_until?|null
funding?string
Default"credits"
last_scan?|null
limit_usd*number
next_run_at?|null
paused?boolean
Defaultfalse
paused_no_credits?boolean
Defaultfalse
scanning?boolean
Defaultfalse
schedule_id?|null
Example Request
curl -X PUT 'https://api.syndai.ai/api/v1/external/coding/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/bug-scan' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true}'
Example Response
{  "enabled": true,  "free_scan_state": "used",  "free_scan_usd": 0,  "full_subscription": "string",  "full_until": "2019-08-24T14:15:22Z",  "funding": "credits",  "last_scan": {    "app": false,    "app_check": "string",    "charged_usd": 0,    "completed_at": "2019-08-24T14:15:22Z",    "files_planned": 0,    "first_scan_areas": 0,    "funded_by": "string",    "groups_planned": 0,    "limit_usd": 0,    "over_limit_groups": 0,    "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",    "stats": {},    "status": "string",    "stopped_at_ceiling": false,    "top_up_usd": 0,    "waiting_on": "string"  },  "limit_usd": 0,  "next_run_at": "2019-08-24T14:15:22Z",  "paused": false,  "paused_no_credits": false,  "scanning": false,  "schedule_id": "8929bb67-0da1-406c-99d2-5447376a4f58"}