Skip to content

Events API

Events capture timestamped occurrences with optional actor linkage.

Endpoints

MethodPathPurpose
POST/eventsCreate event
GET/eventsList events
GET/events/:idGet event
GET/events/timelineDaily timeline aggregation

Example: Create event

bash
curl -X POST http://localhost:3000/events \
  -H 'x-tenant-id: my-app' \
  -H 'content-type: application/json' \
  -d '{
    "actorEntityId":"11111111-1111-1111-1111-111111111111",
    "eventType":"deployment",
    "payload":{"service":"api","version":"0.1.0"},
    "tags":["release"]
  }'

Timeline Example

bash
curl 'http://localhost:3000/events/timeline?days=14&eventType=deployment' \
  -H 'x-tenant-id: my-app'