Yjs WebSocket Endpoint

Last modified by Eleni Cojocariu on 2025/08/05

Reference

URL

// Generic pattern
"ws://<host>/<webAppContextPath>/websocket/<wiki>/yjs"

// For a server running on localhost:8080 and subwiki dev, the url is:
"ws://localhost:8080/xwiki/websocket/dev/yjs"

Query Parameters

A mandatory room parameters must be provided when connecting to the WebSocket. ItsĀ  value is a local document reference.

The edit right of the users are checked for the current user. The connection is closed if the check fails.

Example:

"ws://localhost:8080/xwiki/websocket/dev/yjs?room=Main.WebHome"

Know limitations

The endpoint does not provide a mechanism to authenticate to the endpoint from another domain (see https://jira.xwiki.org/browse/XWIKI-23367).
Therefore, the endpoint is currently only usable when the client code is used in the same domain as the endpoint.

More

Related

Get Connected