Skip to Content

WS /ws/events

General-purpose event subscription channel. Subscribe to specific event types and receive broadcasts when they occur.

Connection Example

wscat -c "wss://api.grails.app/ws/events"

On connect, the server sends:

{ "type": "connected", "clientId": "req-1", "timestamp": "2026-04-08T00:00:00.000Z" }

Client Messages

Message TypeFieldsDescription
subscribeevent: stringSubscribe to an event type
unsubscribeevent: stringUnsubscribe from an event type
pingKeepalive ping

Server Messages

Message TypeDescription
connectedConnection established
subscribedSubscription confirmed
unsubscribedUnsubscription confirmed
eventEvent broadcast (includes event, data, timestamp)
broadcastGlobal broadcast to all clients
pongKeepalive response
errorError message
Last updated on