回退快照
Body {confirm:true(, force:true 若 USER_EDITS_PRESENT 且用户确认覆盖)}。回退整集到过去,自动先打回退前保护点(protectionSnapshotId)。目标集正开着回 409 STUDY_SET_IN_USE(切走再试)。文档目录不在快照覆盖范围。真 dry-run(422 + wouldRestoreToVersion/快照时间/说明/卡数)。
Body {confirm:true(, force:true 若 USER_EDITS_PRESENT 且用户确认覆盖)}。回退整集到过去,自动先打回退前保护点(protectionSnapshotId)。目标集正开着回 409 STUDY_SET_IN_USE(切走再试)。文档目录不在快照覆盖范围。真 dry-run(422 + wouldRestoreToVersion/快照时间/说明/卡数)。
Authorization
bearerAuth 安装脚本写入 ~/.config/mn-bridge/token,或环境变量 MN_BRIDGE_TOKEN。不要带 Origin 头。
In: header
Path Parameters
快照 id(打点/导入/删除响应里的 snapshotId)
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/snapshots/string/restore" \ -H "Content-Type: application/json" \ -d '{ "confirm": true }'准备拆书任务包 POST
Body {topicid, bookmd5, segments[{startPage,endPage,title}](PDF 页序,非连续可,实际页数≤60), preset(book-breakdown|source-structure|exam-general|dictionary), anchorMode(page_text|block), title?, cardStyle{defaultFillIndex -1..2}?, async?}。>~10 页必 async:true(202 {jobId,bundleId,bundlePath,state:preparing} + 轮询 GET /bundles;参数错同步 404/422)。单飞(429 PREPARE_BUSY 看 details.runningJob/retryAfterSeconds)。exam-general 必须配 block(含 role 标注),否则静默退化;错配 0.18+ 回 warnings(停下改组合重 prepare)。同步小包阻塞到完工(curl ≥300s)。
全库搜索 GET
?q=&scope=all|notes|studysets|documents。返回卡/集/文档三类命中。无列全库文档端点,找书用 scope=documents 拿 bookmd5。响应带 scanned/truncated;truncated:true=窗口没够到,加词重搜。新卡约 10s 索引延迟。