POST/v1/scans· Start a scan
Starts the scan at once and returns its id. A public repo link goes as JSON; a zip goes as multipart/form-data. Quota is checked and charged now (see Quota).
| parameter | type | |
|---|---|---|
| repo_url | string | A public GitHub, GitLab or Bitbucket repo, or a branch or folder in one (JSON). |
| file | file | A .zip of the project folder, instead of repo_url (multipart). |
| type | "quick" | "deep" | Default quick. Deep adds the AI review and uses the allowance. |
| project_id | uuid | Zip only: rescan this zip project. Omit to make a new one. |
| project_name | string | Zip only: the new project's name. Default: the file name. |
curl -s "https://setrepo.com/v1/scans" \
-H "Authorization: Bearer $SETREPO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"repo_url":"https://github.com/you/app","type":"deep"}'curl -s "https://setrepo.com/v1/scans" \
-H "Authorization: Bearer $SETREPO_API_KEY" \
-F "file=@app.zip" \
-F "type=quick" \
-F "project_name=My app"{
"scan_id": "3f0c9a52-6d1e-4b8a-9c57-2e41b0d7a913",
"status": "queued"
}