At least one space loaded with a signal configured
The daemon API is available at http://localhost:18080
Run curl http://localhost:18080/api/workspaces to see your loaded spaces and their IDs. Each space’s signals object shows what signals are available and what payload fields they expect.
const response = await fetch( "http://localhost:18080/api/workspaces/{workspaceId}/signals/{signalId}", { method: "POST", headers: { "Content-Type": "application/json", Accept: "text/event-stream", }, body: JSON.stringify({ payload: { key: "value" } }), });const reader = response.body!.getReader();const decoder = new TextDecoder();while (true) { const { done, value } = await reader.read(); if (done) break; for (const line of decoder.decode(value).split("\n")) { if (line.startsWith("data: ")) { const data = line.slice(6); if (data === "[DONE]") break; console.log(JSON.parse(data)); } }}
import httpxwith httpx.stream( "POST", "http://localhost:18080/api/workspaces/{workspaceId}/signals/{signalId}", json={"payload": {"key": "value"}}, headers={"Accept": "text/event-stream"},) as response: response.raise_for_status() for line in response.iter_lines(): if line.startswith("data: ") and line[6:] != "[DONE]": print(line[6:])