Websockets
This commit is contained in:
@@ -8,8 +8,8 @@ info:
|
||||
The API is intended for local control tools and the bundled React UI. All mutating
|
||||
endpoints return a small action result object.
|
||||
|
||||
WebSocket state streaming is planned for the control UI but is not currently served
|
||||
by RenderCadenceCompositor. Clients should poll `/api/state` until `/ws` is implemented.
|
||||
RenderCadenceCompositor serves `/api/state` for snapshots and `/ws` for local
|
||||
WebSocket state updates consumed by the bundled control UI.
|
||||
servers:
|
||||
- url: http://127.0.0.1:8080
|
||||
description: Default local control server
|
||||
@@ -179,6 +179,24 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RuntimeState"
|
||||
/ws:
|
||||
get:
|
||||
tags: [State]
|
||||
summary: Stream runtime state over WebSocket
|
||||
description: |
|
||||
Upgrades to a WebSocket connection. The server sends JSON runtime-state
|
||||
snapshots using the same shape as `GET /api/state` whenever the serialized
|
||||
state changes.
|
||||
operationId: streamRuntimeState
|
||||
responses:
|
||||
"101":
|
||||
description: WebSocket protocol upgrade accepted.
|
||||
"400":
|
||||
description: The request was not a valid WebSocket upgrade.
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
/api/layers/add:
|
||||
post:
|
||||
tags: [Layers]
|
||||
|
||||
Reference in New Issue
Block a user