Json-Python-Server/docs/api-endpoints-status.md
2026-01-29 18:18:32 +08:00

22 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# API 接口清单与完成度
## v1 路由(前缀 `/api`
| 接口 | 方法 | 说明 | 状态 | 备注 |
| --- | --- | --- | --- | --- |
| `/api/upload` | POST | 上传 CSV 文件 | ✅ 已实现 | 仅接受 `settings.ALLOWED_EXTENSIONS`(默认 csv。返回保存后的文件名。 |
| `/api/analyze` | POST | 对上传的 CSV 做完整分析 | ✅ 已实现 | 返回分析结果;已切换 charts 数据模式(`analysis.<lang>.charts``images` 保留为空以兼容旧前端。 |
| `/api/available_methods` | GET | 列出支持的分析方法 | ✅ 已实现 | 静态列表。 |
| `/api/image/{filename}` | GET | 获取图片文件 | ✅ 已实现 | 从 `uploads/` 读取。 |
| `/api/download/{filename}` | GET | 下载文件 | ✅ 已实现 | 从 `uploads/` 读取。 |
| `/api/list_uploads` | GET | 列出上传文件 | ✅ 已实现 | 返回文件名/大小/修改时间。 |
## v2 路由(前缀 `/api/v2`
| 接口 | 方法 | 说明 | 状态 | 备注 |
| --- | --- | --- | --- | --- |
| `/api/v2/analyze` | POST | 从 OSS/URL 下载 CSV 并分析 | ✅ 已实现 | 复用 v1 分析器;已返回 charts 数据模式,`images` 为空。`API_MODE=v2` 下仍禁用图片。 |
| `/api/v2/available_methods` | GET | 列出支持的分析方法 | ✅ 已实现 | 与 v1 相同。 |
## 已知差距 / 待办(尚未实现)
- **预测置信区间**:当前 VAR 仅返回点预测;如需 CI 需改用 `forecast_interval`(不改算法,只取上下界)。
- **异常点标注**暂无标注输出若需要需要在封装层额外计算max/min 或异常检测)。