api-service exposes MVP reports through /api/reports/* and reads metrics from ClickHouse through CLICKHOUSE_HTTP_URL.
GET /api/reports/overviewGET /api/reports/campaignsGET /api/reports/streamsGET /api/reports/destinationsGET /api/reports/sourcesGET /api/reports/trafficbackGET /api/reports/health
Supported query parameters:
from:YYYY-MM-DDor RFC3339 timestamp.to:YYYY-MM-DDor RFC3339 timestamp.timezone: IANA timezone name, defaults toUTC.campaign_idstream_iddestination_idsource_id
Filter IDs accept only letters, numbers, _ and -. Report group fields are selected from a fixed whitelist in code.
The report repository expects these event tables:
click_eventsconversion_eventstrafficback_eventsdestination_health_events
Overview and campaign/stream/destination/source reports aggregate clicks, conversions, revenue, cost, profit and ROI from click and conversion events.
Trafficback and health reports aggregate event counts by reason/status because they are operational event streams, not revenue streams.