Personal Logs API
Personal Logs and Audit History
Query the user-visible audit trail without touching admin endpoints
PrimeCal exposes a personal audit surface for the signed-in user. These endpoints provide both a filterable event feed and an aggregated summary.
JWT or user API keyFilterable audit feedSummary view
Source
- Controller:
backend-nestjs/src/users/users.controller.ts - DTO:
backend-nestjs/src/users/dto/personal-audit.query.dto.ts
Authentication and Permissions
- Both routes require authentication.
- Results are scoped to the current user.
- This page intentionally excludes admin or cross-user audit APIs.
Endpoint Reference
| Method | Path | Purpose | Request or query | Auth | Source |
|---|---|---|---|---|---|
GET | /api/users/me/audit | List the personal audit feed. | Query: categories,outcomes,severities,actions,search,from,to,limit,offset,includeAutomation | JWT or user API key | users/users.controller.ts |
GET | /api/users/me/audit/summary | Return the aggregated audit summary. | Query: same as feed endpoint | JWT or user API key | users/users.controller.ts |
Query Shape
PersonalAuditQueryDto
categories: optional string array, comma-separated values supportedoutcomes: optional string array, comma-separated values supportedseverities: optional string array, comma-separated values supportedactions: optional string array, comma-separated values supportedsearch: optional stringfrom: optional stringto: optional stringlimit: optional int1..500offset: optional int>= 0includeAutomation: optional boolean, defaulttrue
Example Calls
Read recent audit events
curl "$PRIMECAL_API/api/users/me/audit?includeAutomation=true&actions=automation.rule.execute&limit=20" \
-H "Authorization: Bearer $TOKEN"
Read the summary for a date range
curl "$PRIMECAL_API/api/users/me/audit/summary?from=2026-03-22T00:00:00.000Z&to=2026-03-29T23:59:59.999Z" \
-H "Authorization: Bearer $TOKEN"
Response and Behavior Notes
- The summary endpoint internally reuses the feed service and returns
summaryonly. includeAutomation=trueis the switch that pulls automation-originated records into the result set.- Array-like filters accept comma-separated query strings or repeated values.
Best Practices
- Use the feed route for detailed timeline UIs and the summary route for charts or KPI cards.
- Keep
limitreasonably small for interactive views and page through the feed withoffset. - Pair this data with
Compliance APIin privacy-center experiences so users can see both history and controls.