Read live background command output

Read live background command output

Read stdout, stderr, and the observed process status of a background command owned by the authenticated user in an accessible agent session. Supply stdoutFrom and stderrFrom to continue reading from the returned output offsets. When snapshot is true, the response is retained output that replaces previously displayed output rather than appending to it.

GET/api/agent/sessions/{sessionId}/background-commands/{commandId}
Path parameters
sessionIdstringrequired
commandIdstringrequired
Query parameters
stdoutFrominteger
stderrFrominteger

Request

curl
curl -X GET https://trickest.io/api/agent/sessions/{sessionId}/background-commands/{commandId} \
  -H "Authorization: Token $TRICKEST_TOKEN"

Responses

200Output and observed process status
commandIdstringrequired
statusenumrequired

One of: running, stopping, completed, failed, stopped, unknown

stdoutstringrequired
stderrstringrequired
stdoutOffsetintegerrequired
stderrOffsetintegerrequired
truncatedbooleanrequired
snapshotbooleanrequired
exitCodenumberrequired
400Bad Request – validation error or malformed input
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

401Unauthorized – missing or expired token
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

403Forbidden – insufficient permissions
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

429Too Many Requests – rate limited
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

500Internal Server Error
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.