API uses unix epoch ('from' and 'to' params) as timestamps.
API endpoints:
- GET /api/v1/events/type:<type>
- GET /api/v1/events/from:<from>/to:<to>
- GET /api/v1/events/type:<type>/from:<from>/to:<to>
- POST /api/v1/event
Start environment: docker-compose up -d
Examples (curl or postman):
- Get events by type example: curl localhost:3000/api/v1/events/type:user_click
- Get events by time range example: curl localhost:3000/api/v1/events/from:1622575864/to:1622575866
- Get events by type and time range example: curl localhost:3000/api/v1/events/type:user_click/from:1622575864/to:1622575866
- Add event example: curl --header "Content-Type: application/json" --request POST --data '{"event_timestamp":"1625053791","event_type":"user_logout","event_content":"Test content for user logout"}' localhost:3000/api/v1/event
TODO: add mocks and tests