Admin — Compliance
Generate user activity compliance report
Returns a report of user query activity, last login timestamp, and role information 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/user-activity?startDate=2026-01-01&endDate=2026-03-01"{
"rows": [
{
"userId": "string",
"userEmail": "string",
"role": "string",
"totalQueries": 0,
"tablesAccessed": [
"string"
],
"lastActiveAt": "string",
"lastLoginAt": "string"
}
],
"summary": {
"totalUsers": 0,
"activeUsers": 0,
"totalQueries": 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"
}