Get a scan
Where a scan stands. Poll this route every 3 to 5 seconds until done or failed; a quick scan usually takes less than a minute.
OAuth permission: scans:read · an API key has them all
Path parameters
scan_idstringrequiredScan id.
Response
idstringScan id.
objectstringtarget_idstringTarget scanned.
kindstringquick(what any visitor could see),audit(adds deeper read-only checks, verified sites only) orrepository(analysis of a GitHub repository).quickauditrepositorystatusstringScans run asynchronously: poll until
doneorfailed.queuedrunningdonefailedscorenumber | nullScore out of 100, once done.
gradestring | nullGrade, once done.
ABCDFcoveragenumber | nullShare of the checks that could run (0 to 1), once done.
audit_fallbackbooleanAn audit was asked but the site's proof no longer held: a quick scan ran instead and no audit was counted.
reusedbooleanTrue when the request got an existing scan instead of a new one (one already running, or one of the same kind in the last hour); nothing was counted.
next_real_scan_atstring | nullWhen
reusedbecause of a recent scan: when a new scan of this kind may start.created_atstringWhen the scan was requested.
finished_atstring | nullWhen the scan finished.
Errors
| Status | error.code | What happens |
|---|---|---|
| 401 | authentication_required | No key in the request. Pass it in the Authorization: Bearer rst_… header, never in the address. |
| 401 | invalid_api_key | The key or OAuth token is wrong, revoked or expired. Check it is copied in full, or create a new key. |
| 402 | api_plan_required | The workspace is on the Free plan. The API comes with Pro, or on a 14-day trial with Solo. |
| 402 | api_trial_ended | Solo's 14-day trial is over. Move to Pro: your keys work again at once. |
| 403 | scope_missing | The OAuth token lacks the permission this route needs (shown on its page). Reconnect the agent to grant it. An API key has every permission. |
| 404 | resource_not_found | Nothing with this id in the key's workspace. An object of another workspace answers the same: its existence is never revealed. |
| 429 | rate_limited | Too many requests for this key (120 per minute). Wait Retry-After seconds. |
| 500 | internal_error | An error on our side, reported automatically. Retry later; give the Request-Id to support if it comes back. |
| 503 | service_unavailable | Rustine is unavailable for a moment. Retry with the same Idempotency-Key. |