Skip to main content
POST
Run a command
Runs a shell command from the workspace root of the session checkout, for example to resolve a commit conflict. Commands time out after 120 seconds. A command that fails still returns 200, so check exitCode (null with timedOut: true when it timed out).

Authorizations

Authorization
string
header
required

Enter your Zite API key. Format: Bearer <api_key>

Path Parameters

sessionId
string
required

The build session ID from Open a session.

Body

application/json
script
string
required

Shell command to run.

Example:

"git log --oneline -5"

Response

Command output

stdout
string
stderr
string
exitCode
integer | null

Null when the command timed out.

timedOut
boolean
error
string

Set when the command exited non-zero or timed out, for example Script exited with code 1.