Skip to content

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
namestringrequired

App name (a DNS label, e.g. web).

query parameters
object
stdinstring

Set to "1" for an interactive, full-duplex exec (hijacked stream).

Request bodyapplication/json
AppExecReq
cmdarray | null
items
string
cwdstring
envobject
additional properties
string
timeout_sinteger
Responses
200 OKOK
stringbase64
400 Bad requestBad Request
ErrorResponse
errorstring
404 Not foundNot Found
ErrorResponse
errorstring
409 ConflictConflict
ErrorResponse
errorstring
Authentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.
Request
POST/apps/{name}/exec
cURL
curl '/apps/{name}/exec?stdin=' \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{}'
Response
200 OK
No response body.
Was this page helpful?