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
| Field | Type | Required | Description |
|---|---|---|---|
repository_name | string | Yes | Repository name in format org/repo |
branch_name | string | Yes | Branch name to scan |
scan_mode | string | No | Scan mode: "fast" (default) or "plus". Fast uses industry-standard tooling and Rafter’s proprietary analysis for SAST, secret detection, and dependency checks. Plus runs the full fast pipeline plus additional agent-driven analysis passes for deeper coverage. |
Example Request
Response
Success (200 OK):Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the scan was successfully triggered |
scan_id | string | Unique identifier for the scan request |
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

