Interactive exec (WebSocket)
GET/sandboxes/{id}/exec
WebSocket upgrade for a full-duplex interactive exec. The client's first message is the JSON ExecRequest; after that, the concatenated binary message payloads in each direction form exactly the same length-prefixed frame stream as POST ?stdin=1 (stdin/stdin_close up, stdout/stderr/exit down). Frames may split across messages — decode the concatenated stream. Non-WebSocket GETs answer 426.
path parameters
object
idstringrequiredSandbox ID, e.g. sbx_ab12cd34.
Responses
101 Switching Protocols
400 Bad requestBad Request
ErrorResponse
errorstring404 Not foundNot Found
ErrorResponse
errorstringAuthentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.Request
▍GET/sandboxes/{id}/exec
curl '/sandboxes/{id}/exec'const response = await fetch("/sandboxes/{id}/exec", {
method: "GET",
});
const data = await response.json();import requests
response = requests.get(
"/sandboxes/{id}/exec",
)
data = response.json()Response
101
No response body.