Skip to content

Actions

In FlowLayer, user actions are transported as WebSocket commands.

There is no REST action endpoint in the current server API.

Supported command names:

  • get_snapshot
  • get_logs
  • start_service
  • stop_service
  • restart_service
  • start_all
  • stop_all

These are runtime commands handled by the server over /ws.

Every command follows:

  1. client sends command
  2. server returns ack
  3. if accepted, server returns result

ack and result are private to the sender.

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.

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.

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.