v14

latestOpenAPI 3.0.32026-08-04377889.4 MB
sandboxes

List commands

Retrieves a list of all commands that have been executed in a session, including their current status, exit codes, and execution times, ordered from the most recent to the oldest.

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

Path parameters

sessionIdstring required

The unique identifier of the session to list commands for.

Example:sbx_abc123

The unique identifier of the session to list commands for.

Query parameters

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 list of commands executed in the session.

Example response

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