sandboxes

Retrieves the current status and details of a command executed in a session. Use the wait parameter to block until the command finishes execution.

get/v2/sandboxes/sessions/{sessionId}/cmd/{cmdId}

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v2/sandboxes/sessions/{sessionId}/cmd/{cmdId}
  • Auth: HTTP bearer

Path parameters

sessionIdstring required

The unique identifier of the session containing the command.

Example:sbx_abc123
cmdIdstring required

The unique identifier of the command to retrieve.

Example:cmd_abc123

Query parameters

wait'true' | 'false'

If set to "true", the request will block until the command finishes execution. Useful for synchronously waiting for command completion.

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Response

The command data along with the exit code if the command did finish.

Example response

{
  "command": {
    "args": [
      "run",
      "build"
    ],
    "cwd": "/vercel/sandbox",
    "durationMs": 1234,
    "id": "cmd_123a6c5209bc3778245d011443644c8d27dc2c50",
    "name": "npm",
    "sessionId": "sbx_123a6c5209bc3778245d011443644c8d27dc2c50",
    "startedAt": 1673123456789
  }
}

Changes