Reports
Generate audit exports and compliance reports over a date range. Audit exports return raw scan logs in JSON or CSV format, while compliance reports provide aggregated statistics including tier breakdowns, domain distribution, and detection rates.
Plan requirement: Audit export requires the ferpaAuditExport feature and compliance reports require the complianceReports feature, both available on Education plans and above.
/v1/reports/audit-exportExport audit logs for a date range in JSON or CSV format.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Start date in ISO 8601 format (e.g. 2026-01-01) |
to | string | Yes | End date in ISO 8601 format (e.g. 2026-01-31) |
format | "json" | "csv" | No | Output format. Defaults to "json". |
domain | string | No | Filter logs to a specific detection domain (e.g. pii, cultural) |
JSON Response
{
"export": {
"from": "2026-01-01",
"to": "2026-01-31",
"domain": "all",
"total": 142,
"logs": [
{
"id": "uuid",
"created_at": "2026-01-15T10:00:00Z",
"tier": "red",
"action": "block",
"risk_score": 85,
"signals": [...],
"latency_ms": 12
}
]
}
}When format=csv is specified, the response is a downloadable CSV file with columns: id, created_at, tier, action, risk_score, signals_count, latency_ms.
/v1/reports/complianceGenerate an aggregated compliance report for a date range.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Start date in ISO 8601 format |
to | string | Yes | End date in ISO 8601 format |
Compliance Response
{
"report": {
"period": {
"from": "2026-01-01",
"to": "2026-01-31"
},
"total_scans": 1420,
"tier_breakdown": {
"green": 1100,
"yellow": 250,
"red": 70
},
"domain_distribution": {
"pii": 180,
"education": 95,
"cultural": 30,
"injection": 15
},
"signal_frequency": {
"ssn": 45,
"email_address": 120,
"student_id": 60,
"prompt_injection": 15
},
"average_risk_score": 22.5,
"average_latency_ms": 14,
"block_rate": 4.93
}
}The block_rate is the percentage of scans that resulted in a red tier (blocked). The signal_frequency map shows how often each signal type was detected across all scans in the period.
Examples
// Export audit logs as JSON
const audit = await armor.exportAuditLogs({
from: '2026-01-01',
to: '2026-01-31',
});
console.log('Total logs:', audit.total);
// Export filtered by domain
const culturalAudit = await armor.exportAuditLogs({
from: '2026-01-01',
to: '2026-01-31',
domain: 'cultural',
});
// Generate a compliance report
const report = await armor.getComplianceReport({
from: '2026-01-01',
to: '2026-01-31',
});
console.log('Block rate:', report.block_rate + '%');curl "https://indigiarmor.com/v1/reports/audit-export?from=2026-01-01&to=2026-01-31&format=csv" \
-H "Authorization: Bearer ia_sk_..." \
-o audit-export.csvcurl "https://indigiarmor.com/v1/reports/compliance?from=2026-01-01&to=2026-01-31" \
-H "Authorization: Bearer ia_sk_..."