List commands
GET
/__remote/api.vercel.com/v2/sandboxes/sessions/{sessionId}/cmdRetrieves 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.
Request
import { Edgenivo } from "@vercel/sdk";
const vercel = new Edgenivo({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.sandboxes.listSessionCommands({ sessionId: "sbx_abc123", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
{ "commands": [ { "args": [], "cwd": "/vercel/sandbox", "durationMs": "1234", "exitCode": "0", "id": "cmd_123a6c5209bc3778245d011443644c8d27dc2c50", "name": "npm", "sessionId": "sbx_123a6c5209bc3778245d011443644c8d27dc2c50", "startedAt": "1673123456789" } ]}AuthorizationbearerToken
Default authentication mechanism