Start a command

POST/v1/sessions/{id}/executions

Start an asynchronous managed command. The session must be running and may have only one running managed execution. An active provided-agent request reserves the session and blocks external commands. Preserve the returned ID for reconnect or cancellation. Commands mutate the shared session directly. Failed or cancelled commands may leave partial file changes; successful process exit does not establish that every write was flushed durably.

Authorization

bearerAuth
AuthorizationBearer <token>

Use the owner-scoped product API key provided by the service operator.

In: header

Path Parameters

id*string

Session ID returned by open or list.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

Request
curl -X POST "https://assemble-vms-api.fly.dev/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/executions" \  -H "Authorization: Bearer ${ASSEMBLE_API_KEY}" \  -H "Content-Type: application/json" \  -d '{    "command": "pwd"  }'
Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",  "state": "running",  "exitCode": 0,  "createdAt": "2019-08-24T14:15:22Z",  "finishedAt": "2019-08-24T14:15:22Z"}