Skip to content

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

Name
Type
Required
Description
mode
string
—
No description in the catalog.
command
string
•
No description in the catalog.
serviceId
string
•
No description in the catalog.
timeoutSec
integer
—
No description in the catalog.

Response

Field
Type
Always
Description
mode
string
•
output
string
•
stderr
string
•
stdout
string
•
target
object
•
exitCode
integer
•
timedOut
boolean
•
truncated
boolean
•

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.

↑↓navigate↵select