v1

latestOpenAPI 3.0.32026-07-22194221292.5 KB
process

Execute a command

Execute a command and return process information. If Accept header is text/event-stream, streams logs in SSE format and returns the process response as a final event.

post/process

Request body

commandstring required
envobject
keepAliveboolean

Disable scale-to-zero while process runs. Default timeout is 600s (10 minutes). Set timeout to 0 for infinite.

maxRestartsinteger

Maximum number of restarts on failure. Set to a negative value (e.g. -1) for unlimited restarts.

namestring
restartOnFailureboolean
timeoutinteger

Timeout in seconds. When keepAlive is true, defaults to 600s (10 minutes). Set to 0 for infinite (no auto-kill).

waitForCompletionboolean
waitForPortsinteger[]
workingDirstring

Example request

{
  "command": "ls -la",
  "env": {
    "{\"PORT\"": " \"3000\"}"
  },
  "maxRestarts": 3,
  "name": "my-process",
  "restartOnFailure": true,
  "timeout": 30,
  "waitForPorts": [
    3000,
    8080
  ],
  "workingDir": "/home/user"
}

Response

Process information

commandstring required
completedAtstring required
exitCodeinteger required
keepAliveboolean

Whether scale-to-zero is disabled for this process

logsstring required
maxRestartsinteger
namestring required
pidstring required
restartCountinteger
restartOnFailureboolean
startedAtstring required
status'failed' | 'killed' | 'stopped' | 'running' | 'completed' required
stderrstring required
stdoutstring required
workingDirstring required

Example response

{
  "command": "ls -la",
  "completedAt": "Wed, 01 Jan 2023 12:01:00 GMT",
  "logs": "logs output",
  "maxRestarts": 3,
  "name": "my-process",
  "pid": "1234",
  "restartCount": 2,
  "restartOnFailure": true,
  "startedAt": "Wed, 01 Jan 2023 12:00:00 GMT",
  "status": "running",
  "stderr": "stderr output",
  "stdout": "stdout output",
  "workingDir": "/home/user"
}