---
title: "Get workspace container logs (batch)"
method: GET
path: "/workspaces/{namespace}/{name}/podtemplate/logs/batch"
tags: ["workspaces"]
---

# Get workspace container logs (batch)

`GET /workspaces/{namespace}/{name}/podtemplate/logs/batch`

## Request

- Base URL: `http://localhost:4000/api/v1`
- URL: `http://localhost:4000/api/v1/workspaces/{namespace}/{name}/podtemplate/logs/batch`
- Auth: none declared

Returns a point-in-time snapshot of container logs for the workspace pod as a raw text/plain stream proxied directly from the Kubernetes pod logs API. Each log line is always prefixed with an RFC3339 timestamp.

## Path parameters

- `namespace` string, required
- `name` string, required

## Query parameters

- `container` string
- `tailLines` integer
- `sinceTime` string
- `previous` boolean

## Response `200`

Raw container log stream (text/plain).

## Other responses

- `400`: Bad Request. Container not found, pod not running, container not started, or no previous logs available.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Workspace not found.
- `422`: Unprocessable Entity. Validation error.
- `500`: Internal server error.

## Changes

- **2026-09-16** `24448c74071d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/opendatahub-io/apis/kubeflow-notebooks-api/changes/workspaces/:namespace/:name/podtemplate/logs/batch/get.md)

---

[API](https://skmtc.dev/opendatahub-io/apis/kubeflow-notebooks-api.md) - [All operations](https://skmtc.dev/opendatahub-io/apis/kubeflow-notebooks-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opendatahub-io/apis/kubeflow-notebooks-api/revisions/f336b3b779f0?raw)
