说明:API 用于标准化获取文档列表、内容、历史与迭代信息。
Authorization: Bearer <BID_API_TOKEN>X-API-Key: <BID_API_TOKEN>.env 文件中的 BID_API_TOKENPOST /api/auth/login
Body:
{ "username": "admin", "password": "whoami139" }
Response:
{ "code": 0, "message": "ok", "data": { "username": "admin", "token": "<BID_API_TOKEN>" } }
GET /api/auth/me(需要 Token)
https://bid.hao.work/docs/api/http://127.0.0.1:8090/api/2026-01-21 10:49:28 +08:00 或 RFC3339)GET /api/docs(需要 Token)
Response:
{ "code": 0, "message": "ok", "data": [{"path":"01-product-requirements.md","updated_time":"2026-01-21 10:45:00 +08:00"}] }
GET /api/docs/content?path=01-product-requirements.md
可选渲染 HTML:render=1
GET /api/docs/history?path=01-product-requirements.md
GET /api/docs/diff?path=01-product-requirements.md&hash=<commit>
POST /api/docsPUT /api/docsDELETE /api/docs?path=<file>POST/PUT Body 示例:
{ "path": "99-new-doc.md", "content": "# New Doc\n\n内容..." }
GET /api/iterationsPOST /api/iterationsPOST Body 示例:
{
"version": "v0.1.1",
"title": "需求完善",
"summary": "补充数据源与API说明",
"docs": ["04-data-sources-catalog.md", "10-rest-api-spec.md"],
"author": "admin"
}
GET /api/notesPOST /api/notesDELETE /api/notes?id=<note_id>POST Body 示例:
{
"title": "竞品分析新方向",
"content": "考虑增加区域热力与胜率联动分析。",
"tags": ["analysis", "idea"],
"author": "admin"
}
GET /api/automation/status40101 未认证或 Token 错误40001 参数错误40901 资源冲突(已存在)40401 资源不存在50001 服务错误