All API endpoints require HTTP Basic Authentication (configured via DASHBOARD_USER / DASHBOARD_PASSWORD env vars) unless noted otherwise.
Base URL: http://<host>:8080
Authorization: Basic <base64(user:password)>
WebSocket connections authenticate via a token passed in the auth handshake option, matching the WEBSOCKET_TOKEN or DASHBOARD_PASSWORD env var.
All endpoints return errors in a consistent format:
{
"error": "Description of what went wrong"
}Common HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request / validation error |
| 401 | Authentication required |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Rate limit headers are included on all responses:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
Serves the main dashboard HTML page.
Serves the GPS track map page.
Returns system status and last telemetry timestamp.
Response:
{
"status": "ok",
"last_telemetry": "2026-01-15T10:30:00Z",
"trip_active": false
}Receives telemetry data from Torque Pro. Fields are sent as form data with PID names as keys.
Rate Limit: 10,000/hour
Token-authenticated variant of the upload endpoint (no Basic auth needed if token matches).
Returns the most recent telemetry data point.
Response:
{
"timestamp": "2026-01-15T10:30:00Z",
"speed": 45.2,
"soc": 62.5,
"voltage": 380.1,
"current": -12.3,
"engine_rpm": 0,
"coolant_temp": 85
}List trips with optional filtering.
Query Parameters:
| Param | Type | Description |
|---|---|---|
limit |
int | Max results (default 50) |
offset |
int | Pagination offset |
start_date |
ISO date | Filter start |
end_date |
ISO date | Filter end |
Response:
{
"trips": [
{
"id": 1,
"start_time": "2026-01-15T08:00:00Z",
"end_time": "2026-01-15T08:30:00Z",
"total_miles": 12.5,
"electric_miles": 10.2,
"gas_miles": 2.3,
"gas_mpg": 42.1,
"soc_at_switch": 18
}
],
"total": 150
}Get detailed data for a single trip.
Soft-delete a trip.
Update trip metadata.
Overall efficiency statistics.
Response:
{
"lifetime_mpg": 48.3,
"tank_mpg": 52.1,
"avg_soc_floor": 19.2,
"total_miles": 5420.1,
"total_electric_miles": 3200.5,
"total_kwh_used": 980.2,
"kwh_per_mile": 0.306,
"ev_ratio": 0.59
}SOC floor analysis with temperature correlation.
MPG trend data for charting.
Query Parameters:
| Param | Type | Description |
|---|---|---|
days |
int | Lookback period (7, 30, 90, 0=all) |
Compare multiple trips side-by-side.
Body:
{
"trip_ids": [1, 2, 3]
}Get GPS tracks for map display with filtering.
Query Parameters:
| Param | Type | Description |
|---|---|---|
date_range |
string | last_7_days, last_30_days, last_90_days, all |
mode |
string | all, ev_only, gas_only |
Get GPS track for a single trip.
Find trips with similar routes.
Export trip as GPX file.
Export trip as KML file.
List charging sessions.
Add a manual charging session.
Body:
{
"start_time": "2026-01-15T22:00:00Z",
"end_time": "2026-01-16T06:00:00Z",
"start_soc": 15,
"end_soc": 100,
"kwh_added": 12.5,
"charge_type": "L1",
"cost": 1.50,
"location": "Home",
"notes": "Overnight charge"
}Get charging session details.
Get power & SOC curve data for a session.
Update a charging session.
Delete a charging session.
Charging statistics summary (L1/L2 counts, total kWh, costs).
Battery health and degradation data.
Cell voltage readings history.
Latest cell voltage reading.
Cell balance analysis with module comparisons.
Add a manual cell voltage reading.
Fuel event history (refuels detected automatically or added manually).
Add a manual fuel event.
Delete a fuel event.
Update a fuel event.
Export trips as CSV or JSON.
Query Parameters:
| Param | Type | Description |
|---|---|---|
format |
string | csv (default) or json |
Export fuel events as CSV.
Full backup export as JSON.
Download Torque Pro PID configuration CSV.
Import Torque Pro CSV log file(s).
Content-Type: multipart/form-data
Response:
{
"import_code": "IMP-20260115-ABC123",
"status": "completed",
"total_rows": 1500,
"parsed_rows": 1480,
"skipped_rows": 20,
"duplicate_rows": 5
}List import history.
Get details of a specific import.
Quick stats for a timeframe (7d, 30d, 90d, all).
Detailed statistical breakdown.
Powertrain analysis for a trip (motor/generator RPM, power flow).
Powertrain summary for a trip.
Predicted remaining range based on current conditions.
Maintenance status summary.
Engine operating hours breakdown.
Route analysis and frequently-traveled routes.
Battery degradation forecast.
Efficiency correlation with weather conditions.
Efficiency by temperature band.
Impact of precipitation on efficiency.
Wind speed/direction impact on efficiency.
Seasonal efficiency trends.
Optimal weather conditions for efficiency.
Efficiency correlation with elevation changes.
Efficiency by road gradient.
Elevation statistics summary.
Compare routes by elevation profile.
Elevation profile for a specific trip.
Multi-factor efficiency analysis (weather + elevation + driving style).
Efficiency predictions based on conditions.
Efficiency time series with contributing factors.
Optimal conditions for best efficiency.
Bulk soft-delete trips.
Body: { "trip_ids": [1, 2, 3] }
Bulk restore soft-deleted trips.
Bulk update trip metadata.
Bulk export selected trips.
Statistics for a set of trips.
Record Web Vitals performance metrics (sent automatically by the frontend).
Report frontend errors (sent automatically via navigator.sendBeacon).
Connect via Socket.IO to receive real-time updates.
authenticate— Send auth token on connect
telemetry— Real-time telemetry data pointtoast— UI notification (info, warning, error, success)