curl --request GET \
--url https://api.example.com/api/scan/{id}{
"id": "<string>",
"status": "<string>",
"violation_count": 123,
"compliance_score": 123,
"rules_processed": 123,
"rules_total": 123,
"created_at": "<string>",
"completed_at": "<string>",
"audit_name": "<string>",
"record_count": 123,
"policy_id": "<string>",
"upload_id": "<string>",
"mapping_id": "<string>",
"audit_id": "<string>",
"mapping_config": {},
"temporal_scale": "<string>",
"score_history": [
{
"score": 123,
"timestamp": "<string>",
"action": "<string>",
"violation_id": "<string>"
}
],
"delta": {
"new_count": 123,
"resolved_count": 123,
"unchanged_count": 123,
"previous_scan_id": "<string>",
"previous_violation_count": 123
}
}Poll the status and results of a running or completed scan
curl --request GET \
--url https://api.example.com/api/scan/{id}{
"id": "<string>",
"status": "<string>",
"violation_count": 123,
"compliance_score": 123,
"rules_processed": 123,
"rules_total": 123,
"created_at": "<string>",
"completed_at": "<string>",
"audit_name": "<string>",
"record_count": 123,
"policy_id": "<string>",
"upload_id": "<string>",
"mapping_id": "<string>",
"audit_id": "<string>",
"mapping_config": {},
"temporal_scale": "<string>",
"score_history": [
{
"score": 123,
"timestamp": "<string>",
"action": "<string>",
"violation_id": "<string>"
}
],
"delta": {
"new_count": 123,
"resolved_count": 123,
"unchanged_count": 123,
"previous_scan_id": "<string>",
"previous_violation_count": 123
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Basit-Ali0/Yggdrasil/llms.txt
Use this file to discover all available pages before exploring further.
/api/scan/run.
Includes delta analysis comparing the current scan with the previous scan for the same policy, showing new, resolved, and unchanged violations.
/api/scan/runpending - Scan is queuedrunning - Scan is in progresscompleted - Scan finished successfullyfailed - Scan encountered an error0 for in-progress scans0 for in-progress scansrules_total when status is completednull for in-progress scansShow Score History Item
null if no previous scan existsShow Delta Details
{
"id": "abc12345-def6-7890-ghij-klmnopqrstuv",
"status": "running",
"violation_count": 0,
"compliance_score": 0,
"rules_processed": 8,
"rules_total": 15,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": null,
"audit_name": "Q1 2024 Compliance Audit",
"record_count": 42000,
"policy_id": "550e8400-e29b-41d4-a716-446655440000",
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"mapping_id": "789e0123-e45b-67c8-d901-234567890123",
"audit_id": null,
"mapping_config": {
"amount": "Transaction Amount",
"account": "Account ID",
"timestamp": "Date"
},
"temporal_scale": "daily",
"score_history": [],
"delta": null
}
{
"id": "abc12345-def6-7890-ghij-klmnopqrstuv",
"status": "completed",
"violation_count": 23,
"compliance_score": 87.5,
"rules_processed": 15,
"rules_total": 15,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:30:04Z",
"audit_name": "Q1 2024 Compliance Audit",
"record_count": 42000,
"policy_id": "550e8400-e29b-41d4-a716-446655440000",
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"mapping_id": "789e0123-e45b-67c8-d901-234567890123",
"audit_id": null,
"mapping_config": {
"amount": "Transaction Amount",
"account": "Account ID",
"timestamp": "Date"
},
"temporal_scale": "daily",
"score_history": [
{
"score": 87.5,
"timestamp": "2024-01-15T10:30:04Z",
"action": "scan_completed",
"violation_id": null
}
],
"delta": {
"new_count": 5,
"resolved_count": 12,
"unchanged_count": 18,
"previous_scan_id": "prev1234-5678-90ab-cdef-ghijklmnopqr",
"previous_violation_count": 30
}
}
{
"error": "NOT_FOUND",
"message": "Scan not found"
}
delta field provides insights into how violations have changed compared to the previous scan:
rule_id:account, meaning the same rule triggered on the same account.
// Start scan
const { scan_id } = await fetch('/api/scan/run', {
method: 'POST',
body: JSON.stringify({ policy_id, upload_id, mapping_id })
}).then(r => r.json());
// Poll for completion
const status = await fetch(`/api/scan/${scan_id}`).then(r => r.json());
if (status.status === 'completed') {
console.log(`Scan complete: ${status.compliance_score}% compliant`);
console.log(`Found ${status.violation_count} violations`);
}