Realtime API · Dashboard
Inspector, insights & usage
Watch live traffic, read insights and usage, and use the shared logs, metrics, alerts and audit trail.
Base URL: https://api.hubfly.space. Use a Dashboard bearer token authorized for the project. Replace :projectId in each path with the Dashboard project ID. JSON routes use Content-Type: application/json.
Realtime servers live in a project of type managed; other projects return 409 MANAGED_PROJECT_REQUIRED. Replace :instanceId with the realtime server ID from the instance list. Each endpoint lists the permission it needs; a token scoped to the realtime permissions must hold that exact permission.
How to use these endpoints
- Poll recent inspector events to see live traffic. The streaming console behind inspector tokens is opened by the Hubfly space Dashboard and CLI.
- Read insights for a recent window (top channels and events, failures, peak connections) and daily usage per app (connections, messages, bytes, webhook deliveries).
- Use metrics, logs and alerts to watch the server itself.
Read daily usage since a date
curl "https://api.hubfly.space/api/v1/projects/$PROJECT_ID/managed/instances/$INSTANCE_ID/realtime/usage?appId=$APP_ID&since=2026-10-01" \
-H "Authorization: Bearer $HUBFLY_TOKEN"The response uses the standard Dashboard envelope: ok, data, and meta on success. On failure, use the returned error code and message to decide whether to correct the request or retry. The exact schema and response codes for each operation are below.
Endpoint reference
Dashboard endpoints (9)
These JSON routes are served by the Hubfly space Dashboard API and use Dashboard project authorization.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/alerts | Read alert settings |
| PUT | /api/v1/projects/:projectId/managed/instances/:instanceId/alerts/update | Update alert settings |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/audit | List instance audit events |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/logs | Read instance logs |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/metrics | Read instance metrics |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/realtime/insights | Read realtime insights |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/realtime/inspector/recent | Poll recent console events |
| POST | /api/v1/projects/:projectId/managed/instances/:instanceId/realtime/inspector/token | Open a debug console session |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/realtime/usage | Read daily usage |
GETRead alert settingsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/alerts
Returns the instance's alert thresholds and switches and the alerts currently firing, each with the time it started. Defaults are 85% storage, 90% connections, instance-down alerts on and email on.
- Requires
database:read(databases) orrealtime:read(realtime servers). webhookFailuresappears for realtime servers only.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "storagePercent": { "type": "number" }, "connectionsPercent": { "type": "number" }, "instanceDown": { "type": "boolean" }, "email": { "type": "boolean" }, "webhookFailures": { "type": "boolean" } }, "required": [ "storagePercent", "connectionsPercent", "instanceDown", "email" ], "additionalProperties": false }, "firing": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "enum": [ "storage", "connections", "down", "webhooks", "stream_destinations", "stream_processing", "stream_speed", "stream_billing", "stream_domain" ] }, "since": { "type": "string" } }, "required": [ "key", "since" ], "additionalProperties": false } } }, "required": [ "settings", "firing" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "settings": { "storagePercent": 0, "connectionsPercent": 0, "instanceDown": true, "email": true, "webhookFailures": true }, "firing": [ { "key": "storage", "since": "string" } ] }, "meta": { "requestId": "string", "timestamp": "string" } }
PUTUpdate alert settingsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/alerts/update
Replaces the instance's alert settings: storage and connection thresholds, instance-down alerts and email delivery. The response is the new settings with the alerts currently firing.
- Requires
database:admin(databases) orrealtime:admin(realtime servers). storagePercentandconnectionsPercentmust be between 50 and 99; otherwise400 MANAGED_INVALID_ALERTS.webhookFailuresapplies to realtime servers only; omitting it keeps the current choice.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
JSON request body
| Field | Type / allowed values | Required |
|---|---|---|
storagePercent | number | Yes |
connectionsPercent | number | Yes |
instanceDown | boolean | Yes |
email | boolean | Yes |
webhookFailures | boolean | No |
Complete request schema
{
"type": "object",
"properties": {
"storagePercent": {
"type": "number"
},
"connectionsPercent": {
"type": "number"
},
"instanceDown": {
"type": "boolean"
},
"email": {
"type": "boolean"
},
"webhookFailures": {
"type": "boolean"
}
},
"required": [
"storagePercent",
"connectionsPercent",
"instanceDown",
"email"
],
"additionalProperties": false
}Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "storagePercent": { "type": "number" }, "connectionsPercent": { "type": "number" }, "instanceDown": { "type": "boolean" }, "email": { "type": "boolean" }, "webhookFailures": { "type": "boolean" } }, "required": [ "storagePercent", "connectionsPercent", "instanceDown", "email" ], "additionalProperties": false }, "firing": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "enum": [ "storage", "connections", "down", "webhooks", "stream_destinations", "stream_processing", "stream_speed", "stream_billing", "stream_domain" ] }, "since": { "type": "string" } }, "required": [ "key", "since" ], "additionalProperties": false } } }, "required": [ "settings", "firing" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "settings": { "storagePercent": 0, "connectionsPercent": 0, "instanceDown": true, "email": true, "webhookFailures": true }, "firing": [ { "key": "storage", "since": "string" } ] }, "meta": { "requestId": "string", "timestamp": "string" } }
GETList instance audit eventsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/audit
Returns the instance's audit trail, newest first: each change with its action, the user who made it and its metadata.
- Requires
database:admin(databases) orrealtime:admin(realtime servers). limitdefaults to 100 and is capped at 500.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
limit | query | No | number | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "action": { "type": "string" }, "actor": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true } }, "required": [ "id", "name", "email" ], "additionalProperties": false, "nullable": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "createdAt": { "type": "string", "description": "Date string" } }, "required": [ "id", "action", "actor", "metadata", "createdAt" ], "additionalProperties": false } } }, "required": [ "items" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "items": [ { "id": "string", "action": "string", "actor": { "id": "string", "name": "string", "email": "string" }, "metadata": null, "createdAt": "string" } ] }, "meta": { "requestId": "string", "timestamp": "string" } }
GETRead instance logsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/logs
Returns the tail of the instance's standard output and error logs, with known secrets masked, and whether each stream was truncated. Empty logs are returned for an instance that never finished provisioning.
- Requires
database:queryfor databases (their logs can contain query text) orrealtime:readfor realtime servers. tailBytesdefaults to 262144 (256 KiB) and is clamped to 4 KiB-2 MiB.- The response is sent with
cache-control: no-store.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
tailBytes | query | No | number | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "stdout": { "type": "string" }, "stderr": { "type": "string" }, "stdoutTruncated": { "type": "boolean" }, "stderrTruncated": { "type": "boolean" }, "tailBytes": { "type": "number" } }, "required": [ "stdout", "stderr", "stdoutTruncated", "stderrTruncated", "tailBytes" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "stdout": "string", "stderr": "string", "stdoutTruncated": true, "stderrTruncated": true, "tailBytes": 0 }, "meta": { "requestId": "string", "timestamp": "string" } }
GETRead instance metricsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/metrics
Returns current and historical resource metrics for the instance together with database or realtime engine metrics and volume usage. Sections that cannot be read right now, such as on a stopped instance, are null or empty rather than zero.
- Requires
database:read(databases) orrealtime:read(realtime servers). windowSecondsdefaults to 3600 and is clamped to 300-604800;maxPointsdefaults to 120 and is clamped to 10-180.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
windowSeconds | query | No | number | — |
maxPoints | query | No | number | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "latest": { "type": "object", "properties": { "time": { "type": "string" }, "cpuPercent": { "type": "number" }, "memoryUsageBytes": { "type": "number" }, "memoryLimitBytes": { "type": "number" }, "memoryUsagePercent": { "type": "number" }, "storageUsedBytes": { "type": "number" }, "storageTotalBytes": { "type": "number" }, "storageUsagePercent": { "type": "number" }, "processes": { "type": "number" }, "networkRxBytes": { "type": "number" }, "networkTxBytes": { "type": "number" } }, "required": [ "time", "cpuPercent", "memoryUsageBytes", "memoryLimitBytes", "memoryUsagePercent", "storageUsedBytes", "storageTotalBytes", "storageUsagePercent", "processes", "networkRxBytes", "networkTxBytes" ], "additionalProperties": false, "nullable": true }, "history": { "type": "object", "properties": { "windowSeconds": { "type": "number" }, "sampleIntervalSeconds": { "type": "number" }, "records": { "type": "array", "items": { "type": "object", "properties": { "time": { "type": "string" }, "cpuPercent": { "type": "number" }, "memoryUsageBytes": { "type": "number" }, "memoryLimitBytes": { "type": "number" }, "memoryUsagePercent": { "type": "number" }, "storageUsedBytes": { "type": "number" }, "storageTotalBytes": { "type": "number" }, "storageUsagePercent": { "type": "number" }, "processes": { "type": "number" }, "networkRxBytes": { "type": "number" }, "networkTxBytes": { "type": "number" } }, "required": [ "time", "cpuPercent", "memoryUsageBytes", "memoryLimitBytes", "memoryUsagePercent", "storageUsedBytes", "storageTotalBytes", "storageUsagePercent", "processes", "networkRxBytes", "networkTxBytes" ], "additionalProperties": false } } }, "required": [ "windowSeconds", "sampleIntervalSeconds", "records" ], "additionalProperties": false, "nullable": true }, "database": { "type": "object", "properties": { "collectedAt": { "type": "string" }, "uptimeSeconds": { "type": "number", "nullable": true }, "connections": { "type": "object", "properties": { "active": { "type": "number" }, "idle": { "type": "number" }, "total": { "type": "number" }, "max": { "type": "number" } }, "required": [ "active", "idle", "total", "max" ], "additionalProperties": false, "nullable": true }, "commits": { "type": "number", "nullable": true }, "rollbacks": { "type": "number", "nullable": true }, "queriesTotal": { "type": "number", "nullable": true }, "cacheHitRatio": { "type": "number", "nullable": true }, "databaseSizeBytes": { "type": "number", "nullable": true }, "deadlocks": { "type": "number", "nullable": true } }, "required": [ "collectedAt", "uptimeSeconds", "connections", "commits", "rollbacks", "queriesTotal", "cacheHitRatio", "databaseSizeBytes", "deadlocks" ], "additionalProperties": false, "nullable": true }, "databaseHistory": { "type": "array", "items": { "type": "object", "properties": { "t": { "type": "string" }, "connectionsActive": { "type": "number", "nullable": true }, "connectionsTotal": { "type": "number", "nullable": true }, "tps": { "type": "number", "nullable": true }, "qps": { "type": "number", "nullable": true }, "cacheHitRatio": { "type": "number", "nullable": true }, "databaseSizeBytes": { "type": "number", "nullable": true } }, "required": [ "t", "connectionsActive", "connectionsTotal", "tps", "qps", "cacheHitRatio", "databaseSizeBytes" ], "additionalProperties": false } }, "realtime": { "type": "object", "properties": { "collectedAt": { "type": "string" }, "uptimeSeconds": { "type": "number", "nullable": true }, "connections": { "type": "object", "properties": { "current": { "type": "number" }, "peak": { "type": "number" }, "detached": { "type": "number" }, "max": { "type": "number" }, "byProtocol": { "type": "object", "additionalProperties": { "type": "number" } }, "byLibrary": { "type": "object", "additionalProperties": { "type": "number" } } }, "required": [ "current", "peak", "detached", "max", "byProtocol", "byLibrary" ], "additionalProperties": false }, "channels": { "type": "number" }, "subscriptions": { "type": "number" }, "presenceMembers": { "type": "number" }, "messages": { "type": "object", "properties": { "in": { "type": "number" }, "out": { "type": "number" }, "bySource": { "type": "object", "additionalProperties": { "type": "number" } }, "byKind": { "type": "object", "additionalProperties": { "type": "number" } } }, "required": [ "in", "out", "bySource", "byKind" ], "additionalProperties": false }, "bytes": { "type": "object", "properties": { "in": { "type": "number" }, "out": { "type": "number" } }, "required": [ "in", "out" ], "additionalProperties": false }, "closes": { "type": "object", "additionalProperties": { "type": "number" } }, "errors": { "type": "object", "additionalProperties": { "type": "number" } }, "webhooks": { "type": "object", "properties": { "sent": { "type": "number" }, "failed": { "type": "number" }, "backlog": { "type": "number" }, "dead": { "type": "number" }, "dropped": { "type": "number" }, "latencyMsP50": { "type": "number" }, "latencyMsP95": { "type": "number" } }, "required": [ "sent", "failed", "backlog", "dead", "dropped", "latencyMsP50", "latencyMsP95" ], "additionalProperties": false }, "history": { "type": "object", "properties": { "messages": { "type": "number" }, "bytes": { "type": "number" }, "replays": { "type": "number" }, "gaps": { "type": "number" }, "degraded": { "type": "boolean" }, "storedMessages": { "type": "number" }, "storedBytes": { "type": "number" }, "writeErrors": { "type": "number" } }, "required": [ "messages", "bytes", "replays", "gaps", "degraded", "storedMessages", "storedBytes", "writeErrors" ], "additionalProperties": false }, "apps": { "type": "object", "additionalProperties": { "type": "object", "properties": { "connections": { "type": "number" }, "messagesIn": { "type": "number" }, "messagesOut": { "type": "number" }, "bytesOut": { "type": "number" } }, "required": [ "connections", "messagesIn", "messagesOut", "bytesOut" ], "additionalProperties": false } } }, "required": [ "collectedAt", "uptimeSeconds", "connections", "channels", "subscriptions", "presenceMembers", "messages", "bytes", "closes", "errors", "webhooks", "history", "apps" ], "additionalProperties": false, "nullable": true }, "realtimeHistory": { "type": "array", "items": { "type": "object", "properties": { "t": { "type": "string" }, "connections": { "type": "number", "nullable": true }, "connectionsPeak": { "type": "number", "nullable": true }, "detachedSessions": { "type": "number", "nullable": true }, "subscriptions": { "type": "number", "nullable": true }, "messagesInPerSecond": { "type": "number", "nullable": true }, "messagesOutPerSecond": { "type": "number", "nullable": true }, "bytesInPerSecond": { "type": "number", "nullable": true }, "bytesOutPerSecond": { "type": "number", "nullable": true }, "webhookBacklog": { "type": "number", "nullable": true }, "memoryBytes": { "type": "number", "nullable": true } }, "required": [ "t", "connections", "connectionsPeak", "detachedSessions", "subscriptions", "messagesInPerSecond", "messagesOutPerSecond", "bytesInPerSecond", "bytesOutPerSecond", "webhookBacklog", "memoryBytes" ], "additionalProperties": false } }, "volume": { "type": "object", "properties": { "totalBytes": { "type": "number" }, "usedBytes": { "type": "number" } }, "required": [ "totalBytes", "usedBytes" ], "additionalProperties": false, "nullable": true } }, "required": [ "latest", "history", "database", "databaseHistory", "realtime", "realtimeHistory", "volume" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "latest": { "time": "string", "cpuPercent": 0, "memoryUsageBytes": 0, "memoryLimitBytes": 0, "memoryUsagePercent": 0, "storageUsedBytes": 0, "storageTotalBytes": 0, "storageUsagePercent": 0, "processes": 0, "networkRxBytes": 0, "networkTxBytes": 0 }, "history": { "windowSeconds": 0, "sampleIntervalSeconds": 0, "records": [ { "time": "string", "cpuPercent": 0, "memoryUsageBytes": 0, "memoryLimitBytes": 0, "memoryUsagePercent": 0, "storageUsedBytes": 0, "storageTotalBytes": 0, "storageUsagePercent": 0, "processes": 0, "networkRxBytes": 0, "networkTxBytes": 0 } ] }, "database": { "collectedAt": "string", "uptimeSeconds": 0, "connections": { "active": 0, "idle": 0, "total": 0, "max": 0 }, "commits": 0, "rollbacks": 0, "queriesTotal": 0, "cacheHitRatio": 0, "databaseSizeBytes": 0, "deadlocks": 0 }, "databaseHistory": [ { "t": "string", "connectionsActive": 0, "connectionsTotal": 0, "tps": 0, "qps": 0, "cacheHitRatio": 0, "databaseSizeBytes": 0 } ], "realtime": { "collectedAt": "string", "uptimeSeconds": 0, "connections": { "current": 0, "peak": 0, "detached": 0, "max": 0, "byProtocol": null, "byLibrary": null }, "channels": 0, "subscriptions": 0, "presenceMembers": 0, "messages": { "in": 0, "out": 0, "bySource": null, "byKind": null }, "bytes": { "in": 0, "out": 0 }, "closes": null, "errors": null, "webhooks": { "sent": 0, "failed": 0, "backlog": 0, "dead": 0, "dropped": 0, "latencyMsP50": 0, "latencyMsP95": 0 }, "history": { "messages": 0, "bytes": 0, "replays": 0, "gaps": 0, "degraded": true, "storedMessages": 0, "storedBytes": 0, "writeErrors": 0 }, "apps": null }, "realtimeHistory": [ { "t": "string", "connections": 0, "connectionsPeak": 0, "detachedSessions": 0, "subscriptions": 0, "messagesInPerSecond": 0, "messagesOutPerSecond": 0, "bytesInPerSecond": 0, "bytesOutPerSecond": 0, "webhookBacklog": 0, "memoryBytes": 0 } ], "volume": { "totalBytes": 0, "usedBytes": 0 } }, "meta": { "requestId": "string", "timestamp": "string" } }
GETRead realtime insightsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/realtime/insights
Return aggregates for the last windowSeconds: top channels and events, authentication failures, rate-limit and close counts, peak connections, client libraries and webhook health. Optionally scope to one appId; no payloads are included.
- Requires
realtime:read. windowSecondsis 60–86,400, default 3,600 (400 MANAGED_REALTIME_INVALID_WINDOW).- The server must be running:
409 MANAGED_INSTANCE_NOT_RUNNING.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
appId | query | No | string | — |
windowSeconds | query | No | number | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "windowSeconds": { "type": "number" }, "topChannels": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "messages": { "type": "number" }, "bytes": { "type": "number" }, "subscribersPeak": { "type": "number" } }, "required": [ "name", "messages", "bytes", "subscribersPeak" ], "additionalProperties": false } }, "topEvents": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "count": { "type": "number" }, "bytes": { "type": "number" } }, "required": [ "name", "count", "bytes" ], "additionalProperties": false } }, "authFailures": { "type": "array", "items": { "type": "object", "properties": { "reason": { "type": "string" }, "count": { "type": "number" } }, "required": [ "reason", "count" ], "additionalProperties": false } }, "rateLimited": { "type": "object", "additionalProperties": { "type": "number" } }, "closes": { "type": "object", "additionalProperties": { "type": "number" } }, "connectionsPeak": { "type": "number" }, "libraries": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" }, "count": { "type": "number" } }, "required": [ "name", "version", "count" ], "additionalProperties": false } }, "webhooks": { "type": "object", "properties": { "successRate": { "type": "number", "nullable": true }, "latencyMsP95": { "type": "number", "nullable": true }, "backlog": { "type": "number" } }, "required": [ "successRate", "latencyMsP95", "backlog" ], "additionalProperties": false } }, "required": [ "windowSeconds", "topChannels", "topEvents", "authFailures", "rateLimited", "closes", "connectionsPeak", "libraries", "webhooks" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "windowSeconds": 0, "topChannels": [ { "name": "string", "messages": 0, "bytes": 0, "subscribersPeak": 0 } ], "topEvents": [ { "name": "string", "count": 0, "bytes": 0 } ], "authFailures": [ { "reason": "string", "count": 0 } ], "rateLimited": null, "closes": null, "connectionsPeak": 0, "libraries": [ { "name": "string", "version": "string", "count": 0 } ], "webhooks": { "successRate": 0, "latencyMsP95": 0, "backlog": 0 } }, "meta": { "requestId": "string", "timestamp": "string" } }
GETPoll recent console eventsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/realtime/inspector/recent
Return recent debug-console events after afterSeq for clients that cannot hold the inspector socket, with nextSeq to continue and armedUntil. Each poll keeps recording armed for 120 seconds.
- Requires
realtime:publish. limitdefaults to 200 (max 1000);afterSeqis a sequence number of 0 or more (400 MANAGED_REALTIME_INVALID_CURSOR).- Payload previews are stripped unless
payloadPreviewistrue; the response is sent withcache-control: no-store.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
appId | query | No | string | — |
afterSeq | query | No | number | — |
limit | query | No | number | — |
payloadPreview | query | No | boolean | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "number" }, { "const": false, "type": "boolean" }, { "const": true, "type": "boolean" }, { "type": "array", "items": { "type": "string" } } ], "nullable": true } } }, "nextSeq": { "type": "number" }, "armedUntil": { "type": "string", "nullable": true }, "sampling": { "type": "number" } }, "required": [ "events", "nextSeq", "armedUntil", "sampling" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "events": [ null ], "nextSeq": 0, "armedUntil": "string", "sampling": 0 }, "meta": { "requestId": "string", "timestamp": "string" } }
POSTOpen a debug console sessionDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/realtime/inspector/token
Mint a short-lived, single-use token for the live debug console and return it with the wss:// inspector url, expiresAt, the allowed origin and the watched apps. Send the token as the socket's first frame ({"type":"auth","token":"…"}), never in the URL.
- Requires
realtime:publish. The server must be running (409 MANAGED_INSTANCE_NOT_RUNNING). - The response is sent with
cache-control: no-store; tokens live at most 120 seconds and work once. - The socket must be opened from the Hubfly space dashboard or CLI origin, else
403 MANAGED_REALTIME_INSPECTOR_ORIGIN. appstakes up to 100 app IDs (default all); payload previews needpayloadPreview: trueand the app'sinspectorPayloadPreviewsetting.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
JSON request body
| Field | Type / allowed values | Required |
|---|---|---|
origin | string | No |
apps | string[] | No |
payloadPreview | boolean | No |
Complete request schema
{
"type": "object",
"properties": {
"origin": {
"type": "string"
},
"apps": {
"type": "array",
"items": {
"type": "string"
}
},
"payloadPreview": {
"type": "boolean"
}
},
"required": [],
"additionalProperties": false
}Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "token": { "type": "string" }, "url": { "type": "string" }, "expiresAt": { "type": "string", "description": "Date string" }, "origin": { "type": "string" }, "apps": { "type": "array", "items": { "type": "string" } }, "payloadPreview": { "type": "boolean" } }, "required": [ "token", "url", "expiresAt", "origin", "apps", "payloadPreview" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "token": "string", "url": "string", "expiresAt": "string", "origin": "string", "apps": [ "string" ], "payloadPreview": true }, "meta": { "requestId": "string", "timestamp": "string" } }
GETRead daily usageDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/realtime/usage
Return daily usage per app since since: peak connections, connection minutes, messages and bytes in and out, and webhook deliveries. Optionally filter to one appId.
- Requires
realtime:read. sinceis aYYYY-MM-DDdate within the last 400 days (default 30 days back); otherwise400 MANAGED_REALTIME_INVALID_SINCE.- The server must be running:
409 MANAGED_INSTANCE_NOT_RUNNING.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
appId | query | No | string | — |
since | query | No | string | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "days": { "type": "array", "items": { "type": "object", "properties": { "day": { "type": "string" }, "appId": { "type": "string" }, "peakConnections": { "type": "number" }, "connectionMinutes": { "type": "number" }, "messagesIn": { "type": "number" }, "messagesOut": { "type": "number" }, "bytesIn": { "type": "number" }, "bytesOut": { "type": "number" }, "webhookDeliveries": { "type": "number" } }, "required": [ "day", "appId", "peakConnections", "connectionMinutes", "messagesIn", "messagesOut", "bytesIn", "bytesOut", "webhookDeliveries" ], "additionalProperties": false } } }, "required": [ "days" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "days": [ { "day": "string", "appId": "string", "peakConnections": 0, "connectionMinutes": 0, "messagesIn": 0, "messagesOut": 0, "bytesIn": 0, "bytesOut": 0, "webhookDeliveries": 0 } ] }, "meta": { "requestId": "string", "timestamp": "string" } }
Related guides
- Realtime overview and workflows
- Realtime protocol reference (WebSocket, server API and webhooks)
- All Realtime API sections
- Dashboard errors and status codes