Actions
In FlowLayer, user actions are transported as WebSocket commands.
There is no REST action endpoint in the current server API.
Runtime commands behind actions
Supported command names:
get_snapshotget_logsstart_servicestop_servicerestart_servicestart_allstop_all
These are runtime commands handled by the server over /ws.
Action lifecycle
Every command follows:
- client sends
command - server returns
ack - if accepted, server returns
result
ack and result are private to the sender.
UX action vs runtime command
A UI action is client-side intent. A runtime command is protocol-level execution.
Examples:
- "Start selected service" (UX) ->
start_service(runtime command) - "Stop all services" (UX) ->
stop_all(runtime command) - "Refresh logs" (UX) ->
get_logs(runtime command)
The client can change UX behavior by context (selection, disabled states, confirmation UI) without changing server command contracts.
Typical payloads
Service-scoped commands require payload.service:
{
"type": "command",
"id": "cmd-42",
"name": "restart_service",
"payload": {
"service": "api"
}
}
Batch commands (start_all, stop_all) use no payload.
Failure shape to expect
Rejected commands return ack.accepted = false with protocol error payloads (for example unknown_service, service_busy, invalid_payload).
Accepted commands still can finish with result.ok = false and an error payload.
See Protocol Overview and Logs for transport and continuity details.