Skip to main content
POST
折叠第一条批注

路径参数

noteid
string
必填

卡片的 noteid。取自卡片命令响应的 noteid、POST /notes/batch-get 响应里 items[].noteid,或 GET /ui-state 的 state.focusnoteid。

请求体

application/json
targets
object[]
必填

要折叠或展开的批注。重复目标返回 422 INVALID_INPUT。

Required array length: 1 - 200 elements

批注折叠目标。只能使用 index 或 ownerNoteId + commentId 其中一种定位方式。 index 来自 GET /notes/{noteid}/comments,从 1 开始。较早的批注可能没有 commentId, 这类条目使用 index 定位。

collapsed
boolean
必填

true 折叠,false 展开。

expectedRevision
string
必填

GET /notes/{noteid}/comments 响应顶层的 revision。读写之间批注投影变化时返回 409 COMMENT_CHANGED。

confirm
boolean
必填

必填。由 MarginNote 自动补上。

响应

批注折叠结果。看 persisted 与是否存在 error 判断写入是否成功。

写操作响应的公共部分。部分接口另带自己的字段。

persisted
boolean

是否已写入。独立重新读取核对一致之后才为 true,是判断写入成功的唯一依据。

noteid
string

本次改动的卡片。

changedCount
number

实际改动的对象数。

collapsed
boolean

本次请求写入的目标状态。

requestedCount
integer

请求里的目标数量。

affectedOwnerNoteIds
string[]

实际发生改动的归属卡片。无状态变化时为空数组。

revision
string

写入后重新计算的批注投影版本号。

comments
object[]