Get target execution

  • GET
  • /workspaces
  • /:workspace
  • /targets
  • /execs
  • /:exec_id

Get the status of a single execution.

Request

REQUIRED SCOPES
TARGET_INFO
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

exec_idrequiredstring
Execution ID returned by the execute endpoint

Example: "9214386e-7633-4d2b-ac66-fcfbaf5ea99b"

GET PARAMETERS
waitinteger
Long-poll budget in ms. Omit to use the server default: the request is held until the execution reaches a terminal status, returning the current status once the budget elapses. Send 0 to return immediately. Clamped server-side.

Example: 10000

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
execution_idstring
The ID of the execution
target_idstring
The ID of the target
target_typestring enum
The type of the target
Allowed enum:
FTP,
SSH,
MATCH,
MATCH_ID,
VULTR,
DIGITAL_OCEAN,
UPCLOUD,
GIT,
ARTIFACT_VERSION,
GKE,
EKS,
AKS,
DOKS,
K8S_CLUSTER,
EC2,
AGENT,
SANDBOX,
MYSQL,
PROJECT_REPO,
POSTGRESQL,
MONGO,
MSSQL,
RDS_MSSQL
invokerMemberView
User/member reference
cancelled_byMemberView
User/member reference
proxy_target_idstring
The ID of the proxy target used to tunnel the connection
commandstring
The executed command
started_atstring
The date and time when the execution started
finished_atstring
The date and time when the execution finished
statusstring
The status of the execution. One of: INPROGRESS, SUCCESSFUL, FAILED, CANCELLED
failure_reasonstring
Platform-level reason a FAILED execution failed (absent for an ordinary non-zero exit): TIMEOUT (hard time cap reached), SPAWN_FAILED (execution could not be started), BASTION_FAILED (SSH bastion tunnel failed)
exit_codeinteger
The exit code of the executed command
bytes_outinteger
The size of the execution output in bytes
truncatedboolean
Indicates if the execution output was truncated
error_messagestring
The error message if the execution failed
log_urlstring
The URL to fetch the execution log

Last modified on Aug 13, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/targets/execs/:exec_id" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json"
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/targets/execs/9214386e-7633-4d2b-ac66-fcfbaf5ea99b", "log_url": "https://api.buddy.works/workspaces/my-workspace/targets/execs/9214386e-7633-4d2b-ac66-fcfbaf5ea99b/log", "execution_id": "9214386e-7633-4d2b-ac66-fcfbaf5ea99b", "target_id": "tg-b185vd3ct4chv", "target_type": "MYSQL", "invoker": { "url": "https://api.buddy.works/workspaces/my-workspace/members/1", "id": 1, "name": "John Doe" }, "command": "mysql sql=SELECT 1 AS ok, NOW() AS ts", "started_at": "2026-05-28T08:00:09.820Z", "finished_at": "2026-05-28T08:00:10.412Z", "status": "SUCCESSFUL", "exit_code": 0, "bytes_out": 156, "truncated": false }
STATUS
200 OK