Giao diện
Tổng quan API
TÓM TẮT
FastAPI backend (forecast_engine/main.py) expose 13 routers với 50+ endpoints. Swagger UI tại /docs, ReDoc tại /redoc.
Base URL
| Environment | URL |
|---|---|
| Local | http://localhost:8000 |
| Production | https://api.boxme-forecast.railway.app |
| Docs (Swagger) | /docs |
| Docs (ReDoc) | /redoc |
13 Routers
| Router | Prefix | File | Mô tả |
|---|---|---|---|
| Health | /health | routes_health.py | Health check |
| Forecast | /forecast | routes_forecast.py | Forecast generation & queries |
| Train | /train | routes_train.py | Model training |
| Evaluate | /evaluate | routes_evaluate.py | Model evaluation |
| Models | /models | routes_models.py | Model registry |
| Calendar | /calendar | routes_calendar.py | Event calendar |
| AutoML | /automl | routes_automl.py | Self-improvement |
| Dashboard | /dashboard | routes_dashboard.py | Dashboard data |
| LLM Config | /llm-config | routes_llm_config.py | LLM provider settings |
| Backtest | /backtest | routes_backtest.py | Backtest runs |
| Profiler | /profiler | routes_profiler.py | Data profiling |
| Improvement | /improvement | routes_improvement.py | Improvement cycles |
| Override | /override | routes_override.py | Manual overrides |
Chi tiết từng nhóm endpoint
Authentication
Hiện tại API không yêu cầu authentication (internal use). CORS configured cho all origins.
BẢO MẬT
Production nên restrict CORS origins và thêm API key authentication.