POST /api/static/scan
Trigger a new security scan for a specific repository and branch.Request
Headers:x-api-key(required): Your Rafter security API keyContent-Type: application/json
The
github_token field is optional. When omitted, the scan uses the OAuth credentials linked to your Rafter account. Use this field for scanning private repositories without OAuth — the token only needs Contents:Read permission.Example Request
Response
Success (200 OK):Response Fields
Rate Limiting
The API implements rate limiting to ensure fair usage:- Rate Limit: 100 requests per minute per IP address
- Quota: Based on your subscription plan
Examples
JavaScript
Python
Next Steps
After triggering a scan, you can:- Check scan status using the
scan_idwith the Get Results endpoint - Wait for completion by polling the status endpoint
- Retrieve results once the scan is complete

