Skip to content

Deployment

deployment_service_exec

Run a command against a service.

Tool

deployment_service_exec

Run a command against a service.

Run a command against a service. mode:"exec" (default) execs non-interactively into the first running pod (debugging); mode:"job" runs a one-off Job of the service's current image with its env (migrations). Returns stdout/stderr + exit code as text. command is run via /bin/sh -c.

Behavior

HTTP
POST /deployment/services/:serviceId/exec

Arguments

NameTypeRequiredDescription
modestringNo description in the catalog.
commandstringNo description in the catalog.
serviceIdstringNo description in the catalog.
timeoutSecintegerNo description in the catalog.

Response

FieldTypeAlwaysDescription
modestring
outputstring
stderrstring
stdoutstring
targetobject
exitCodeinteger
timedOutboolean
truncatedboolean

Try it

Run a command against a service.

When to use

Run a command against a service. mode:"exec" (default) execs non-interactively into the first running pod (debugging); mode:"job" runs a one-off Job of the service's current image with its env (migrations). Returns stdout/stderr + exit code as text. command is run via /bin/sh -c.

Example

Ask your agent something like this:

Run a command against a service.

The agent will invoke deployment_service_exec with these arguments:

{
  "command": "<command>",
  "serviceId": "<serviceId>"
}

Esc

Start typing to search the docs.

navigateselect