Machines
Execute Command
Execute a command on a specific Machine and return a JSON response containing stdout, stderr, exit_code, and exit_signal.
A completed command returns HTTP 200, including when the command exits unsuccessfully.
HTTP 412 is returned when the Machine is not running. On Machines without
containers, it can also indicate an error before or during command execution.
For example, the executable may be missing or lack execute permission. The
error field describes the failure.
HTTP 413 responses include a status field identifying the size limit that was
exceeded:
exec_request_too_large: the Machine rejected the exec request as too large. The error message isexec request rejected: payload too large. The limit applies to the encoded request sent to the Machine, which can differ in size from the public API request.exec_output_too_large: the command ran, but its output could not be returned because it exceeded the maximum allowed response size after JSON encoding.
POST
Execute Command
Authorizations
Body
application/json
Request body