Activity Service
Overview
The Activity Service provides an immutable audit trail of user and system actions across the application. Each activity record captures what happened, who did it, which entity was involved, and from which screen or IP address.
Activity records are append-only — they cannot be updated or deleted.
All activity operations are tenant-aware.
Database table
ref.Activity
Endpoints
GET
/api/v1/Activity/{id}
Returns a single activity record by its numeric identifier.
Route parameters:
id(long, required) - activity identifier
Behavior:
- Looks up the activity record by ID
- Returns
404if not found
Response:
ActivityModel
Authorization:
- Requires Bearer Token
- Permission:
FullRead
GET
/api/v1/Activity
Returns a list of recent activity records, newest first.
Query parameters:
limit(int, default: 20) - maximum number of records to returnuserId(long, optional) - filter by user IDentityId(long, optional) - filter by entity ID
Behavior:
- Returns up to
limitrecords ordered byCreatedAtdescending - All filters are optional and can be combined
Response:
List<ActivityModel>
Authorization:
- Requires Bearer Token
- Permission:
FullRead
POST
/api/v1/Activity
Records a new activity entry.
Request body (ActivityModel):
ActivityCode(int, required) - numeric code identifying the type of activityUserId(long?, optional) - user who performed the actionEntityId(long?, optional) - entity the action relates toComment(string?, optional) - human-readable descriptionScreen(string?, optional) - screen or feature area where the action occurredIPAddress(string?, optional) - IP address of the requestor
Behavior:
CreatedAtis set automatically- No update or delete is permitted on activity records
Response:
201 Created-ActivityModel
Authorization:
- Requires Bearer Token
- Permission:
FullManage
Model
ActivityModel
Fields:
Id (type: long)- internal identifierCreatedAt (type: DateTime)- timestamp the record was createdActivityCode (type: int)- numeric activity type codeUserId (type: long?)- user who performed the actionComment (type: string?)- description of the activityEntityId (type: long?)- related entity identifierScreen (type: string?)- originating screen or featureIPAddress (type: string?)- IP address
Notes
- Activity records are immutable — no PUT or DELETE endpoints exist
- All data is tenant-scoped
- Internal errors are logged but not exposed to API consumers