Skip to main content
Was this helpful?

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

MethodPathPurposeRequest or queryAuthSource
GET/api/users/me/auditList the personal audit feed.Query: categories,outcomes,severities,actions,search,from,to,limit,offset,includeAutomationJWT or user API keyusers/users.controller.ts
GET/api/users/me/audit/summaryReturn the aggregated audit summary.Query: same as feed endpointJWT or user API keyusers/users.controller.ts

Query Shape

PersonalAuditQueryDto

  • categories: optional string array, comma-separated values supported
  • outcomes: optional string array, comma-separated values supported
  • severities: optional string array, comma-separated values supported
  • actions: optional string array, comma-separated values supported
  • search: optional string
  • from: optional string
  • to: optional string
  • limit: optional int 1..500
  • offset: optional int >= 0
  • includeAutomation: optional boolean, default true

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 summary only.
  • includeAutomation=true is 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 limit reasonably small for interactive views and page through the feed with offset.
  • Pair this data with Compliance API in privacy-center experiences so users can see both history and controls.