API Endpoints Reference¶
Detailed REST API endpoint documentation.
Scan Endpoints¶
POST /api/scan/start¶
Start a new security scan.
Request:
Response:
GET /api/scan/{scanId}¶
Get scan status and results.
Response:
GET /api/scan/{scanId}/logs¶
Stream live logs via Server-Sent Events.
Usage:
const eventSource = new EventSource(`/api/scan/{scanId}/logs`);
eventSource.onmessage = (event) => {
const log = JSON.parse(event.data);
};
Response Schemas¶
See API Schemas for complete type definitions.
Error Handling¶
| Status | Error | Cause |
|---|---|---|
| 400 | Invalid URL format | Malformed URL |
| 404 | Scan not found | Invalid scanId |
| 408 | Request timeout | Target unresponsive |
| 429 | Rate limit exceeded | Too many requests |
| 500 | Server error | Internal failure |
Next Steps¶
- Response Schemas — Request/response types
- API Overview — General API info