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
POST /api/v1/tenants/{tenant_id}/realtime/subscribeCreates a realtime subscription for a tenant.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
Responses
| Status | Description |
|---|---|
200 | Subscription created |
401 | Missing or invalid API key |
500 | Internal error |
operationId: subscribeRealtime
Open a realtime WebSocket
GET /api/v1/tenants/{tenant_id}/realtime/wsUpgrades the connection to a realtime WebSocket stream for a tenant.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
Responses
| Status | Description |
|---|---|
101 | WebSocket upgrade |
401 | Missing or invalid API key |
500 | Internal error |
operationId: realtimeWebsocket