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 |
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_id
with the Get Results endpoint - Wait for completion by polling the status endpoint
- Retrieve results once the scan is complete