Syndai Docs

Turn a paid check on or off

PUT
/api/v1/external/coding/repositories/{repository_id}/scans

Set a paid check's (code or app) cadence (daily, weekly, monthly, or off) and its per-run limit (limit_usd, 5 to 300, default 25). Turning it on is your consent to spend up to that limit per run, at most the monthly maximum GET shows; a first turn-on also starts a first scan now. Off pauses it, withdraws that consent and cancels its scan in progress. Owners and admins only (403 otherwise). 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
cadence*string
Value in"off""daily""weekly""monthly"
kind*string
limit_usd?|
Range5 <= value <= 300

Response Body

Request fulfilled, document follows

application/json
  1. response
free_scan_state*string
free_scan_usd*number
full_subscription?string|null
full_until?|null
funding*string
kinds*array<>
Example Request
curl -X PUT 'https://api.syndai.ai/api/v1/external/coding/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/scans' \  -H 'Content-Type: application/json' \  -d '{  "cadence": "off",  "kind": "string"}'
Example Response
{  "free_scan_state": "string",  "free_scan_usd": 0,  "full_subscription": "string",  "full_until": "2019-08-24T14:15:22Z",  "funding": "string",  "kinds": [    {      "cadence": "string",      "cadences": [        "string"      ],      "description": "string",      "kind": "string",      "label": "string",      "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_done": 0,        "groups_planned": 0,        "limit_usd": 0,        "over_limit_groups": 0,        "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",        "started_at": "2019-08-24T14:15:22Z",        "stats": {},        "status": "string",        "stopped_at_ceiling": false,        "top_up_usd": 0,        "waiting_on": "string"      },      "limit_usd": 0,      "monthly_max_usd": 0,      "needs_consent": false,      "next_run_at": "2019-08-24T14:15:22Z",      "paused_no_credits": false,      "price": "string",      "scanning": false,      "typical_usd": 0    }  ]}
Was this page helpful?