REST API endpoint for retrieving events (EventLog) of a specific case with the ability to filter by event types and stream types, sorted by sequence number (seq).
GET /api/cases/{caseId}/events
caseId(UUID, required) - case identifier
-
eventType(string, optional, repeatable) - filter by event type. Multiple values can be specified.- Allowed values:
CASE_STARTED,CASE_COMPLETED,CASE_FAULTED,CASE_CANCELLED,CASE_STATUS_CHANGED,TASK_CREATED,TASK_COMPLETED,TASK_FAILED,TASK_CANCELLED,WORKER_SCHEDULED,WORKER_EXECUTION_STARTED,WORKER_EXECUTION_COMPLETED,WORKER_EXECUTION_FAILED,WORK_SUBMITTED,WORK_COMPLETED,SIGNAL_RECEIVED,MILESTONE_REACHED,MILESTONE_ACTIVATED,MILESTONE_COMPLETED,MILESTONE_SLA_VIOLATED,GOAL_REACHED,SUBCASE_STARTED,SUBCASE_COMPLETED
- Allowed values:
-
streamType(string, optional, repeatable) - filter by stream type. Multiple values can be specified.- Allowed values:
CASE,WORKER,TIMER,SYSTEM
- Allowed values:
Array of EventLogDTO objects sorted by seq field in ascending order.
{
"id": 123,
"caseId": "550e8400-e29b-41d4-a716-446655440000",
"seq": 1,
"eventType": "CASE_STARTED",
"streamType": "CASE",
"workerId": "worker-1",
"timestamp": "2026-05-07T10:00:00Z",
"payload": {},
"metadata": {}
}curl http://localhost:8080/api/cases/550e8400-e29b-41d4-a716-446655440000/eventscurl "http://localhost:8080/api/cases/550e8400-e29b-41d4-a716-446655440000/events?streamType=WORKER"curl "http://localhost:8080/api/cases/550e8400-e29b-41d4-a716-446655440000/events?eventType=WORKER_EXECUTION_STARTED&eventType=WORKER_EXECUTION_COMPLETED"curl "http://localhost:8080/api/cases/550e8400-e29b-41d4-a716-446655440000/events?streamType=CASE&eventType=CASE_STARTED&eventType=CASE_COMPLETED"New method in EventLogRepository:
Uni<List<EventLog>> findByCaseWithFilters(
UUID caseId,
Collection<CaseHubEventType> eventTypes,
Collection<EventStreamType> streamTypes
);- If
eventTypesorstreamTypesarenullor empty, the corresponding filter is not applied - Results are always sorted by
seqin ascending order - Implemented in
JpaEventLogRepositoryandInMemoryEventLogRepository
EventLogResource- JAX-RS resourceEventLogDTO- DTO for EventLog serialization
Implementation is tested in:
JpaEventLogRepositoryTest(Hibernate persistence)InMemoryEventLogRepositoryTest(in-memory persistence)