API reference — Compliance reporting
The compliance reporting API provides aggregated statistics on DLP policy bundle detections. Admins can retrieve per-bundle event counts by severity and action, an all-bundles overview, and a combined exportable report — suitable for compliance officer dashboards and quarterly reviews.
All endpoints are admin-only. Authentication: Authorization: Bearer arb_live_<admin-key>.
Base path: /api/admin/compliance
Schemas
Section titled “Schemas”Bundle stats response
Section titled “Bundle stats response”Returned by GET /bundles/{bundle_id}/stats.
| Field | Type | Description |
|---|---|---|
bundle_id | UUID | Compliance bundle identifier |
bundle_name | string | Bundle display name |
total_events | integer | Total detection events in the period |
by_severity | object | Event counts grouped by severity label |
by_action | object | Event counts grouped by policy action (block, redact, allow, require_approval) |
daily_trend | object[] | Per-day event counts for the period |
Compliance summary response
Section titled “Compliance summary response”Returned by GET /summary.
| Field | Type | Description |
|---|---|---|
days | integer | Reporting period in days |
total_events | integer | Total events across all bundles |
coverage_percent | float | Percentage of requests that triggered at least one compliance rule |
top_triggers | object[] | Top 10 triggering rules by event count |
bundles | object[] | Per-bundle summary (name, event count, action breakdown) |
Compliance report response
Section titled “Compliance report response”Returned by GET /report — combines summary with full per-bundle stats.
| Field | Type | Description |
|---|---|---|
generated_at | datetime | ISO 8601 timestamp of report generation |
period_days | integer | Reporting period in days |
summary | object | Same as compliance summary response |
bundle_details | object[] | Full per-bundle stats for all active bundles |
Endpoints
Section titled “Endpoints”Get per-bundle detection statistics
Section titled “Get per-bundle detection statistics”GET /api/admin/compliance/bundles/{bundle_id}/stats
Returns event counts, severity breakdown, action breakdown, and daily trend for a specific compliance bundle.
Path parameters:
| Parameter | Description |
|---|---|
bundle_id | UUID of the compliance bundle |
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
days | integer | 30 | Look-back period in days (1–365) |
Request:
GET /api/admin/compliance/bundles/3fa85f64-5717-4562-b3fc-2c963f66afa6/stats?days=30Authorization: Bearer arb_live_your-admin-keyResponse (200):
{ "bundle_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "bundle_name": "HIPAA PHI Protection", "total_events": 4820, "by_severity": { "critical": 82, "high": 640, "medium": 2100, "low": 1998 }, "by_action": { "block": 722, "redact": 2640, "allow": 1340, "require_approval": 118 }, "daily_trend": [ { "date": "2026-03-11", "event_count": 184 }, { "date": "2026-03-12", "event_count": 142 } ]}Error (400 Bad Request):
{ "detail": "Invalid bundle_id format" }Error (404 Not Found):
{ "detail": "Compliance bundle not found" }Get all-bundles compliance overview
Section titled “Get all-bundles compliance overview”GET /api/admin/compliance/summary
Returns a top-level compliance overview across all active bundles — total events, coverage percentage, and per-bundle summary.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
days | integer | 30 | Look-back period in days (1–365) |
Request:
GET /api/admin/compliance/summary?days=30Authorization: Bearer arb_live_your-admin-keyResponse (200):
{ "days": 30, "total_events": 18240, "coverage_percent": 8.4, "top_triggers": [ { "rule_name": "Credit card number", "bundle": "PCI DSS", "event_count": 3820 }, { "rule_name": "SSN pattern", "bundle": "HIPAA PHI Protection", "event_count": 2110 }, { "rule_name": "AWS key", "bundle": "Credential Exposure", "event_count": 1840 } ], "bundles": [ { "bundle_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "bundle_name": "HIPAA PHI Protection", "total_events": 4820, "by_action": { "block": 722, "redact": 2640, "allow": 1340, "require_approval": 118 } }, { "bundle_id": "7c8d9e0f-1234-5678-abcd-ef0123456789", "bundle_name": "PCI DSS", "total_events": 6200, "by_action": { "block": 980, "redact": 4100, "allow": 1120, "require_approval": 0 } } ]}coverage_percent is the percentage of all requests in the period that triggered at least one compliance rule detection event. A value of 8.4% means 8.4% of requests contained content matched by a compliance bundle rule.
Generate exportable compliance report
Section titled “Generate exportable compliance report”GET /api/admin/compliance/report
Combines the compliance summary with full per-bundle statistics into a single payload suitable for export or storage.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
days | integer | 30 | Look-back period in days (1–365) |
Request:
GET /api/admin/compliance/report?days=90Authorization: Bearer arb_live_your-admin-keyResponse (200):
{ "generated_at": "2026-03-12T14:00:00Z", "period_days": 90, "summary": { "days": 90, "total_events": 54200, "coverage_percent": 9.1, "top_triggers": [ ... ], "bundles": [ ... ] }, "bundle_details": [ { "bundle_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "bundle_name": "HIPAA PHI Protection", "total_events": 14460, "by_severity": { ... }, "by_action": { ... }, "daily_trend": [ ... ] } ]}Usage examples
Section titled “Usage examples”Quarterly compliance report export
Section titled “Quarterly compliance report export”# Generate a 90-day report and save to filecurl -s \ "https://api.arbitex.ai/api/admin/compliance/report?days=90" \ -H "Authorization: Bearer arb_live_your-admin-key" \ | jq '.' > compliance-report-q1-2026.jsonCheck for high-severity PHI detections
Section titled “Check for high-severity PHI detections”# Get 7-day stats for a specific bundlecurl -s \ "https://api.arbitex.ai/api/admin/compliance/bundles/{bundle_id}/stats?days=7" \ -H "Authorization: Bearer arb_live_your-admin-key" \ | jq '.by_severity.critical'Monitor daily compliance trend
Section titled “Monitor daily compliance trend”import httpx
resp = httpx.get( "https://api.arbitex.ai/api/admin/compliance/summary", headers={"Authorization": "Bearer arb_live_your-admin-key"}, params={"days": 7},)summary = resp.json()print(f"Total events: {summary['total_events']}")print(f"Coverage: {summary['coverage_percent']}%")for bundle in summary["bundles"]: print(f" {bundle['bundle_name']}: {bundle['total_events']} events")See also
Section titled “See also”- Compliance bundles admin guide — managing compliance bundle configurations
- DLP pipeline configuration guide — understanding DLP rule tiers and actions
- Audit log management guide — event-level audit records for compliance review
- Compliance frameworks reference — SOC 2, HIPAA, PCI DSS control mappings