Authorization header, so they are for server-side code — a script, a bot, your own backend. Browsers cannot set that header on a WebSocket or an EventSource; the Storiza dashboard uses its own session for these.
Use
wss://api.storiza.store for WebSockets and https://api.storiza.store for the event stream.
Console output — attach
Raw bytes in both directions: what the app prints arrives as it prints it, and what you send goes to its standard input. There is no framing and no control protocol — every message is data.
POST /apps/{id}/stdin and read GET /apps/{id}/logs.
Shell — terminal
An interactive shell (the template’s own — bash or sh) in the running container, on a terminal: it echoes what you type, so it behaves like SSH. Send keystrokes, receive the terminal’s output. For a single command, POST /apps/{id}/exec is simpler.
Both attach and terminal need the app to be running. On a stopped app the connection is refused with 409 APP_STOPPED before it opens — read GET /apps/{id}/logs to see why an app stopped.
Live metrics
metrics event arrives straight away and then once per sample — every minute for hour, every five minutes for day. A value the node cannot measure is null, never 0.
Collaborative editing — files/live
Opens one text file for shared editing. Only changes travel — each keystroke is a few bytes — and simultaneous edits from several people merge without conflicts. It is what the dashboard’s code editor uses.
The protocol is the standard y-websocket one, so its WebsocketProvider connects unchanged:
- The text is
Y.Text("content").Y.Map("meta")holdsdirty,savedAtandlastSavefor everyone. - Edits are held by Storiza until someone saves: a binary frame of type
100— a var-uint100, a var-string request id, then one byte,1to overwrite a file that changed on disk since it was opened. The result appears inmeta.lastSavewith that request id. - Unsaved edits are kept for 30 minutes after the last person leaves, so a reconnect does not lose them.
- The connection is closed for good with code
4404if the file is deleted,4410if it is moved (open the new path) and4413if the document grows past 2 MB.