基地址:/api/v1
鉴权:除公开接口外,均需 HTTP Header:
Authorization: Bearer <access_token>POST /auth/register
{username, password, role}POST /auth/token
username, password{access_token, token_type}GET /users/me
GET /knowledge-graph/knowledge/{knowledge_code}
POST /knowledge-graph/knowledge/{knowledge_code}?name=...(teacher)
POST /digital-human/ask
{session_id?, question, knowledge_code?}{session_id, answer, sources[]}POST /recommendation/recommend
{knowledge_code?, limit}{items: [{item_type, item_ref, reason?}]}POST /assessment/exercises(teacher)
{title, body, knowledge_code?, difficulty?}GET /assessment/exercises?knowledge_code=...
POST /assessment/exercises/{exercise_id}/attempts
{answer}GET /assessment/attempts/meGET /learning-analytics/me
{attempts_total, correct_total, accuracy}启动后在 http://localhost:8000/docs 查看完整可交互接口文档(可直接用于前后端联调)。