Skip to main content
POST
/
applications
/
{id}
/
processes
/
{process_id}
/
exec
Run a command in a process
curl --request POST \
  --url https://api.sevalla.com/v3/applications/{id}/processes/{process_id}/exec \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": [
    "ls",
    "-la",
    "/app"
  ],
  "timeout": 15
}
'
{
  "stdout": "total 8\ndrwxr-xr-x 2 app app 4096 Jan 1 00:00 .\n",
  "stderr": "",
  "exit_code": 0
}

Documentation Index

Fetch the complete documentation index at: https://api-docs.sevalla.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Application identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

process_id
string<uuid>
required

Process identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Body

application/json
command
string[]
required

Command to run, given as an argument vector where the first element is the binary and the rest are its arguments (for example ["ls", "-la", "/app"]). The command is run directly, not through a shell, so shell features like pipes, redirects, globbing, and chaining with ; or && are not available. Run those as separate calls instead. API keys with only read access to the application can run read-only commands (such as ls, cat, env, ps, grep); keys with write access can run any command.

Required array length: 1 - 100 elements
Example:
["ls", "-la", "/app"]
timeout
integer
default:15

Maximum time in seconds to wait for the command to finish before it is aborted. Defaults to 15 seconds.

Required range: 1 <= x <= 60
Example:

15

Response

Default Response

stdout
string
required

Standard output produced by the command.

Example:

"total 8\ndrwxr-xr-x 2 app app 4096 Jan 1 00:00 .\n"

stderr
string
required

Standard error produced by the command.

Example:

""

exit_code
integer
required

Exit code returned by the command. 0 means success; any other value means the command failed.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

0