---
title: "Stream command logs"
method: GET
path: "/v2/sandboxes/sessions/{sessionId}/cmd/{cmdId}/logs"
tags: ["sandboxes"]
---

# Stream command logs

`GET /v2/sandboxes/sessions/{sessionId}/cmd/{cmdId}/logs`

Streams the output of a command in real-time using newline-delimited JSON (ND-JSON). Each entry includes the output data and stream type. Stream types include `stdout`, `stderr`, and `error` (for stream failures).

## Path parameters

- `sessionId` string, required — The unique identifier of the session containing the command.
- `cmdId` string, required — The unique identifier of the command to stream logs for.

## Query parameters

- `teamId` string
- `slug` string

## Response `200`

## Other responses

- `400` — One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `404`
- `410`
- `422`
- `429`
- `500`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/61d1ba3f6dac/schema)
