Send a binary Yjs update
Changed onThis endpoint is used to send a Yjs binary update to the room’s Yjs document. You can use this endpoint to initialize Yjs data for the room or to update the room’s Yjs document. To send an update to a subdocument instead of the main document, pass its guid. Corresponds to liveblocks.sendYjsBinaryUpdate.
The update is typically obtained by calling Y.encodeStateAsUpdate(doc). See the Yjs documentation for more details. When manually making this HTTP call, set the HTTP header Content-Type to application/octet-stream, and send the binary update (a Uint8Array) in the body of the HTTP request. This endpoint does not accept JSON, unlike most other endpoints.
Request
- Base URL: https://api.liveblocks.io/v2
- URL: https://api.liveblocks.io/v2/rooms/{roomId}/ydoc
- Auth: none declared
Path parameters
ID of the room
Query parameters
ID of the subdocument
Response
Success. The given room’s Yjs doc has been updated.
Changes
- breaking
request body became required
- breaking
removed the media type
application/jsonfor the response with the status - info
api operation id
put-rooms-roomId-ydocremoved and replaced withsend-yjs-binary-update
- breaking
- info
the request's body type was generalized from
arraytostring
- info