Admin — Compliance
Generate data access compliance report
Returns a report of who queried what tables, when, and how often within the specified date range.
Query Parameters
startDate*string
Start date (ISO 8601)
endDate*string
End date (ISO 8601)
userId?string
Filter by user ID
role?string
Filter by role
table?string
Filter by table name
format?string
Response format
Default
"json"Value in
"json" | "csv"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:3001/api/v1/admin/compliance/reports/data-access?startDate=2026-01-01&endDate=2026-03-01"{
"rows": [
{
"tableName": "string",
"userId": "string",
"userEmail": "string",
"userRole": "string",
"queryCount": 0,
"uniqueColumns": [
"string"
],
"hasPII": true,
"firstAccess": "string",
"lastAccess": "string"
}
],
"summary": {
"totalQueries": 0,
"uniqueUsers": 0,
"uniqueTables": 0,
"piiTablesAccessed": 0
},
"filters": {
"startDate": "string",
"endDate": "string",
"userId": "string",
"role": "string",
"table": "string"
},
"generatedAt": "string"
}{
"error": "string",
"message": "string",
"requestId": "string"
}{
"property1": null,
"property2": null
}{
"property1": null,
"property2": null
}{
"error": "string",
"message": "string",
"requestId": "string"
}{
"error": "string",
"message": "string",
"requestId": "string"
}