Run a command in an app's current instance (streams frames)
POST/apps/{name}/exec
Resolves the app to its current instance and runs the command there, streaming the same length-prefixed frame protocol as POST /sandboxes/{id}/exec (?stdin=1 for a hijacked interactive session). Resolution is per-request, so it targets whatever instance is current across a self-heal or rolling update. 409 when the app has no running instance.
path parameters
object
namestringrequiredApp name (a DNS label, e.g. web).
query parameters
object
stdinstringSet to "1" for an interactive, full-duplex exec (hijacked stream).
Request bodyapplication/json
AppExecReq
cmdarray | null
items
string
cwdstringenvobject
additional properties
string
timeout_sintegerResponses
200 OKOK
stringbase64
400 Bad requestBad Request
ErrorResponse
errorstring404 Not foundNot Found
ErrorResponse
errorstring409 ConflictConflict
ErrorResponse
errorstringAuthentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.Request
▍POST/apps/{name}/exec
curl '/apps/{name}/exec?stdin=' \
-X POST \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch("/apps/{name}/exec?stdin=", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: "{}",
});
const data = await response.json();import requests
response = requests.post(
"/apps/{name}/exec?stdin=",
headers={
"Content-Type": "application/json",
},
data="{}",
)
data = response.json()Response
200 OK
No response body.