note

Move a document, or change where it sits among its neighbours

Moves the document with everything nested under it: to another collection, under another parent, to another place in the list of its neighbours, or all three at once. The request describes where the document lands, not what changes about it - an absent collectionId means the collection it is in now, an absent parentId means a root of the target collection, so a reorder among children names its parent too. position is the sort weight the listings answer with: pass a number between the weights of two neighbours to land between them, and omit it to land last. The weight actually stored is recomputed from the neighbours - it may differ from the one asked for - so the answer carries the document as it was saved. Requires the right to edit both the collection the document leaves and the one it enters. A move into a branch shared with a wider audience is refused separately, as NOTE_MOVE_ACCESS_ESCALATION: it would hand that audience everything being moved.

post/note.document.move

Request body

idinteger required
collectionIdinteger
parentIdinteger
positioninteger

Example request

{
  "id": 1,
  "collectionId": 1,
  "parentId": 1,
  "position": 1
}

Response

Success response

Changes

Changed in 1 of the 26 revisions of this API.1