Guard API Documentation
The Guard Security Platform provides a RESTful API for integrating security scans, retrieving reports, and accessing platform statistics. All responses are in JSON format.
Base URL
https://guard.offseq.com
Rate Limits
IP Rate Limit:3 requests per hour per IP
Domain Limit:1 scan per domain per 24 hours
Response Format
All API responses follow a consistent JSON format. Successful responses include the requested data, while errors include an error message and appropriate HTTP status code.
Success Response
{
"success": true,
"data": { ... }
}
Error Response
{
"error": "Error message",
"details": "Additional information"
}
Quick Integration Guide
Integrating the Guard API into your application is straightforward. Here's a simple example of how to scan a website and retrieve the results:
// 1. Start a scan
const scanResponse = await fetch('https://guard.offseq.com/api/analyze', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: 'https://example.com' })
});
const { domain } = await scanResponse.json();
// 2. Poll for results (scan typically takes 30-60 seconds)
let report;
do {
await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5 seconds
const reportResponse = await fetch(`https://guard.offseq.com/api/reports/${domain}`);
report = await reportResponse.json();
} while (report.status === 'analyzing');
// 3. Process the results
console.log('Security Score:', report.riskScore);
console.log('Risk Level:', report.riskLevel);