Yjs
Get Yjs document
Changed onThis endpoint returns a JSON representation of the room’s Yjs document. Corresponds to liveblocks.getYjsDocument.
get/rooms/{roomId}/ydoc
Request
- Base URL: https://api.liveblocks.io/v2
- URL: https://api.liveblocks.io/v2/rooms/{roomId}/ydoc
- Auth: none declared
Path parameters
roomIdstring required
ID of the room
Example:my-room-id
Query parameters
formattingboolean
If present, YText will return formatting.
keystring
Returns only a single key’s value, e.g. doc.get(key).toJSON().
Example:root
type'ymap' | 'ytext' | 'yxmltext' | 'yxmlfragment' | 'yarray'
Used with key to override the inferred type, i.e. "ymap" will return doc.get(key, Y.Map).
Example:ymap
Response
Success. Returns the room’s Yjs document as JSON.
Get Yjs Document Response required
Example response
{
"someYText": "Contents of YText"
}Changes
- info
api operation id
get-rooms-roomId-ydocremoved and replaced withget-yjs-document
- info