API Reference
Complete endpoint reference for the Audit Service. All endpoints require JWT authentication. The service runs on port 8086.
Audit Events
| Method | Path | Description |
|---|---|---|
POST | /api/v1/audit/events | Create audit event (synchronous) |
POST | /api/v1/audit/events/async | Create audit event (asynchronous via Kafka) |
GET | /api/v1/audit/events/:eventId | Get audit event by ID |
GET | /api/v1/audit/tenants/:tenantId/events | List tenant events (paginated) |
GET | /api/v1/audit/tenants/:tenantId/events/time-range | List events by time range |
GET | /api/v1/audit/tenants/:tenantId/actors/:actorId/events | List events by actor |
GET | /api/v1/audit/tenants/:tenantId/resources/:resourceType/:resourceId/events | List events by resource |
GET | /api/v1/audit/correlation/:correlationId | Get events by correlation ID |
GET | /api/v1/audit/tenants/:tenantId/events/failed | List failed events |
POST | /api/v1/audit/search | Full-text search with filters |
Analytics
| Method | Path | Description |
|---|---|---|
GET | /api/v1/audit/analytics/tenants/:tenantId/dashboard | Dashboard metrics |
GET | /api/v1/audit/analytics/tenants/:tenantId/time-series | Time series data |
GET | /api/v1/audit/analytics/tenants/:tenantId/access-patterns | Access pattern analysis |
GET | /api/v1/audit/analytics/tenants/:tenantId/users/:actorId/behavior | User behavior analysis |
GET | /api/v1/audit/analytics/tenants/:tenantId/anomalies | Anomaly detection |
POST | /api/v1/audit/analytics/tenants/:tenantId/baseline/recalculate | Recalculate baselines |
Compliance Reports
| Method | Path | Description |
|---|---|---|
GET | /api/v1/audit/reports/tenants/:tenantId/soc2 | SOC 2 compliance report |
GET | /api/v1/audit/reports/tenants/:tenantId/gdpr | GDPR compliance report |
GET | /api/v1/audit/reports/tenants/:tenantId/security-summary | Security summary report |
GET | /api/v1/audit/reports/tenants/:tenantId/users/:userId/activity | User activity report |
GET | /api/v1/audit/reports/tenants/:tenantId/summary | Combined compliance summary |
Data Access Reports
| Method | Path | Description |
|---|---|---|
GET | /api/v1/audit/data-access/tenants/:tenantId/report | Tenant data access report |
GET | /api/v1/audit/data-access/tenants/:tenantId/resources/:resourceType/:resourceId | Resource access report |
GET | /api/v1/audit/data-access/tenants/:tenantId/users/:userId | User data access report |
GET | /api/v1/audit/data-access/tenants/:tenantId/anomalies | Data access anomaly detection |
GDPR
| Method | Path | Description |
|---|---|---|
POST | /api/v1/gdpr/requests/data-access | Create data access request |
POST | /api/v1/gdpr/requests/data-deletion | Create deletion request |
POST | /api/v1/gdpr/requests/data-portability | Create portability request |
POST | /api/v1/gdpr/requests/verify/:token | Verify request identity |
GET | /api/v1/gdpr/requests/:requestId | Get request by ID |
GET | /api/v1/gdpr/tenants/:tenantId/requests | List tenant requests |
GET | /api/v1/gdpr/tenants/:tenantId/requests/status/:status | Filter by status |
GET | /api/v1/gdpr/tenants/:tenantId/requests/type/:type | Filter by type |
GET | /api/v1/gdpr/subjects/:dataSubjectId/requests | Get subject requests |
POST | /api/v1/gdpr/requests/:requestId/reject | Reject a request |
GET | /api/v1/gdpr/requests/:requestId/download | Download export file |
GET | /api/v1/gdpr/tenants/:tenantId/stats | GDPR statistics |
SIEM Integration
| Method | Path | Description |
|---|---|---|
POST | /api/v1/audit/siem/tenants/:tenantId/configurations | Register SIEM config |
GET | /api/v1/audit/siem/tenants/:tenantId/configurations | List SIEM configs |
PUT | /api/v1/audit/siem/tenants/:tenantId/configurations/:configId | Update SIEM config |
DELETE | /api/v1/audit/siem/tenants/:tenantId/configurations/:configId | Delete SIEM config |
PATCH | /api/v1/audit/siem/tenants/:tenantId/configurations/:configId/enabled | Enable/disable |
POST | /api/v1/audit/siem/tenants/:tenantId/configurations/test | Test connection |
GET | /api/v1/audit/siem/tenants/:tenantId/stats | Forwarding statistics |
GET | /api/v1/audit/siem/types | Supported SIEM types |
Retention Policies
| Method | Path | Description |
|---|---|---|
POST | /api/v1/audit/retention/policies | Create retention policy |
GET | /api/v1/audit/retention/policies/:policyId | Get policy by ID |
GET | /api/v1/audit/retention/tenants/:tenantId/policy | Get tenant policy |
GET | /api/v1/audit/retention/policies | List all policies |
PUT | /api/v1/audit/retention/policies/:policyId | Update policy |
DELETE | /api/v1/audit/retention/policies/:policyId | Delete policy |
POST | /api/v1/audit/retention/tenants/:tenantId/execute | Execute retention for tenant |
GET | /api/v1/audit/retention/tenants/:tenantId/stats | Retention statistics |
POST | /api/v1/audit/retention/execute-all | Execute all retention policies |