Articles in this section

View the audit history of an entity

Published:
Updated:

When you need the full change history of one specific record — a single vehicle, booking, or driver — MobilityManager provides a dedicated entity history view. It returns every audit entry for that record in one call, newest first. This article explains how to use it.

Required permission

Viewing entity audit history requires the settings:view permission. Access is read-only and scoped to your current tenant.

How to retrieve an entity's history

  1. Identify the record's entity type — the kind of record, such as Vehicle, Booking, or Driver.
  2. Identify the record's entity ID — its primary key value.
  3. Call GET /api/audit/entity/{entityType}/{entityId}.

The response lists all matching audit entries ordered from most recent to oldest, along with a count of how many were returned.

What you see for each change

Every entry in the history includes the action (Insert, Update, or Delete), the timestamp in UTC, and the user who made the change. For updates, the entry shows exactly which columns changed together with their original and new values, so you can trace how the record evolved field by field.

Tip: The first (oldest) entry for a record is usually its Insert, and the newest entry sits at the top. Reading from the bottom up reconstructs the record's life from creation to its current state.

Entity type and ID must match exactly

The entity type is matched by name, so use the exact type as recorded in the audit trail (for example Vehicle, not vehicles). The entity ID is the record's primary key. If either value does not match, the history comes back empty rather than as an error.

Note: Unlike the general audit list, entity history is not paged — it returns the complete set of entries for the record. For very active records, this can be a long list.

When to use this instead of the filtered list

The filtered audit list is best for browsing across many records or users. The entity history view is best when you already know the exact record and want its complete, self-contained timeline in a single request.

Related

  • View and filter audit entries
  • The audit trail and what it captures
  • View a user's audit history
  • Why audit entries cannot be edited or deleted
AH
Written by Alexander Hagemann
Updated:
Access denied
Access denied