Context - Runtime

Execute in runtime sandbox

Run a shell command in the workspace runtime sandbox. Tracked working-tree changes the command produced (additions, edits, deletions, renames) are auto-committed and pushed to the workspace's default branch as a single commit. Pass commitMessage to customize the commit subject; gitignored paths are skipped. The response's commit field is present iff a commit landed.

post/context/runtime/execute

Request

  • Base URL
    https://api.getcargo.io/v1
  • URL
    https://api.getcargo.io/v1/context/runtime/execute
  • Auth
    HTTP bearer

Request body

commandstring required

Shell command to run inside the runtime sandbox.

argsstring[]

Optional arguments passed to the command.

commitMessagestring

Optional override for the auto-commit message. When the command leaves uncommitted changes (additions, edits, deletions, renames) in the working tree, those changes are always pushed to the workspace repo's default branch as a single commit; this field only customizes the commit subject. Defaults to context(runtime): execute <command>.

Response

Successful response

exitCodenumber required
stdoutstring required
stderrstring required

Changes

No recorded changes to this operation across all 1 revision of this API.