文档
API 文档
REST API · JWT 鉴权
鉴权
除 /api/auth/login 外,所有接口需携带 Authorization: Bearer <token>。
POST /api/auth/login
Content-Type: application/json
{ "username": "admin", "password": "admin" }
→ { "token": "...", "role": "..." }车辆 / 告警
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/vehicles | 车辆列表 |
| GET | /api/kpis | 运营 KPI 总览 |
| GET | /api/alarms | 告警列表 |
| GET | /api/vehicles/{vin}/residual | 单车残值评估 |
储能
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/storage/clusters | 储能簇列表 |
| GET | /api/storage/strategy | 24h 充放电计划 |
| GET | /api/storage/financial | 收益测算 |
| GET | /api/storage/h2/zones | 氢安全监测 |
| GET | /api/storage/hvac/devices | 暖通设备 |
节电
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/power/overview | 节电总览 |
| GET | /api/power/analysis/trend | 能耗趋势 |
| GET | /api/power/analysis/daily | 能耗日报 |
| GET | /api/power/meters | 电表列表 |