Get Video Graph
T5-4 (BILLING_RULES.md §5): per-video baseline-vs-actual graph payload.
Returns the data the frontend needs to render the per-video click-through view: baseline-vs-actual daily revenue series with optimization-event markers. Authorization: video must belong to a channel owned by user_id.
Shape: { "video_id": int, "youtube_video_id": str, "title": str, "baseline_period_start": date, "baseline_period_end": date, "baseline_avg_daily_revenue": float, "daily_dates": [date, ...], # one entry per day post-baseline "actual_daily_revenue": [float, ...], "projected_daily_revenue": [float, ...], # slope-line projection from baseline "opt_event_markers": [{"applied_at": iso, "optimization_id": int}, ...], "incremental_total": float, }
Sources:
- baseline: video_baselines (one row per video; T3-1)
- actual: revenue_snapshots (one row per video per day)
- projected: linear extrapolation from baseline.slope/intercept across the actual-data date range
- markers: video_optimizations.applied_at where status='applied'
Path parameters
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.