ScalixScalix Docs
Sign up

Realtime API

Realtime API to create subscriptions and open WebSocket streams for live, per-tenant database change updates in Scalix Cloud.

Changes are delivered on the WebSocket, not over REST. The REST endpoints manage subscriptions (create, list, delete) and publish test events; row changes arrive only on an open GET .../realtime/ws stream. A subscription with no live WebSocket connected means changes are not reaching you: there is no webhook-style push for database changes (use Events for event-driven delivery).

REST API endpoints for Realtime. 2 operations.

Create a realtime subscription

plaintext
POST /api/v1/tenants/{tenant_id}/realtime/subscribe

Creates a realtime subscription for a tenant.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)

Responses

StatusDescription
200Subscription created
401Missing or invalid API key
500Internal error

operationId: subscribeRealtime

Open a realtime WebSocket

plaintext
GET /api/v1/tenants/{tenant_id}/realtime/ws

Upgrades the connection to a realtime WebSocket stream for a tenant.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)

Responses

StatusDescription
101WebSocket upgrade
401Missing or invalid API key
500Internal error

operationId: realtimeWebsocket