dots.v2.microvms.byMicrovm_id().exec.post()
Generated on 13 Nov 2026
from DoTs version
v1.24.0
Usage
client.v2.microvms.byMicrovm_id(microvm_id).exec.post(body: Exec_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Exec_response>Description
To run a command in a MicroVM’s workload container, send a POST request to
/v2/microvms/{microvm_id}/exec.
argv runs directly, not through a shell, with standard input closed. If the MicroVM is
paused and auto-resume is on, the request resumes it and waits until it is running.
A command has 60 seconds to finish. Your team can run 32 commands at once and 60 commands per minute. Rejected requests count toward the per-minute limit.
Parameters
Path Parameters
microvm_idstring requiredExample:
01a0ef1a-d873-793d-ae6a-5dd6239be62aThe unique ID of the MicroVM.
Request Body
argvarray of strings requiredExample:
["nginx", "-v"]The command and its arguments.
cwdstring optionalExample:
/usr/share/nginx/htmlThe working directory to run the command in.
outputEncodingstring optionalHow
stdoutandstderrare returned.utf-8(the default) is a JSON string; bytes that are not valid UTF-8 become U+FFFD.base64returns the exact bytes. Usebase64when the command may emit binary output.
Request Sample
Response Example
More Information
See /v2/microvms/{microvm_id}/exec in the API reference for additional detail on responses, headers, parameters, and more.