Data Access Reports
The DataAccessReportController provides specialized reporting on data access patterns within a tenant. These reports track who accessed what data, when, and how frequently. They also include anomaly detection to identify unusual data access behavior.
Tenant Data Access Report
Endpoint: GET /api/v1/audit/data-access/tenants/:tenantId/report
Generates a comprehensive data access report for the entire tenant.
| Parameter | Type | Default | Description |
|---|---|---|---|
startDate | Instant | 30 days ago | Report start date |
endDate | Instant | now | Report end date |
curl "http://localhost:8086/api/v1/audit/data-access/tenants/550e8400/report" \
-H "Authorization: Bearer ${TOKEN}"The report includes:
- Total data access events
- Access frequency by resource type
- Top accessed resources
- Access patterns by time of day
- Users with highest data access volume
Resource Access Report
Endpoint: GET /api/v1/audit/data-access/tenants/:tenantId/resources/:resourceType/:resourceId
Generates an access report for a specific resource, showing all actors who accessed it and when.
| Parameter | Type | Default | Description |
|---|---|---|---|
startDate | Instant | 30 days ago | Report start date |
endDate | Instant | now | Report end date |
curl "http://localhost:8086/api/v1/audit/data-access/tenants/550e8400/resources/dashboard/dash-001" \
-H "Authorization: Bearer ${TOKEN}"User Data Access Report
Endpoint: GET /api/v1/audit/data-access/tenants/:tenantId/users/:userId
Generates a data access report for a specific user, showing all resources they accessed during the reporting period.
| Parameter | Type | Default | Description |
|---|---|---|---|
startDate | Instant | 30 days ago | Report start date |
endDate | Instant | now | Report end date |
curl "http://localhost:8086/api/v1/audit/data-access/tenants/550e8400/users/660e8400" \
-H "Authorization: Bearer ${TOKEN}"Data Access Anomaly Detection
Endpoint: GET /api/v1/audit/data-access/tenants/:tenantId/anomalies
Analyzes data access patterns and identifies anomalies such as:
- Unusual volume of data access by a single user
- Access to resources outside a user's normal scope
- Data access during unusual hours
- Bulk data export activity
- First-time access to sensitive resources
| Parameter | Type | Default | Description |
|---|---|---|---|
startDate | Instant | 7 days ago | Analysis start date |
endDate | Instant | now | Analysis end date |
curl "http://localhost:8086/api/v1/audit/data-access/tenants/550e8400/anomalies" \
-H "Authorization: Bearer ${TOKEN}"Data access anomaly detection uses a shorter default window (7 days) compared to other reports (30 days). This provides a more focused view of recent suspicious activity.