---
title: "Preview Build Workspace"
method: GET
path: "/v2/builds/{build_id}/workspace/preview"
tags: ["builds"]
---

# Preview Build Workspace

`GET /v2/builds/{build_id}/workspace/preview`

Return the text content of a captured workspace file (1 MiB cap, text only).

## Path parameters

- `build_id` string, uuid, required

## Query parameters

- `path` string, required

## Response `200`

Successful Response

- BuildSourcePreviewResponse
  - `build_id` string, uuid, required
  - `path` string, required
  - `content` string, required
  - `size` integer, required
  - `content_hash` string, required
  - `content_type` string, required

## Other responses

- `400` — Invalid or malformed request
- `401` — Missing or invalid credentials
- `403` — Caller may not access this resource
- `404` — Referenced entity does not exist
- `409` — Resource already exists
- `422` — Validation Error

## Changes

- **2026-09-21** `74fedf0c50ba` — 2 warning
  - removed the optional property `errors/items/ctx` from the response with the `422` status
  - removed the optional property `errors/items/input` from the response with the `422` status
- **2026-09-16** `05b868460954` — 1 breaking, 9 info
  - the `detail` response's property type changed from `array` to `string` for status `422`
  - the response property `detail` became required for the status `422`
  - added the required property `error` to the response with the `422` status
  - added the required property `errors` to the response with the `422` status
  - …6 more

[Change history](https://skmtc.dev/hud/apis/hud-platform/changes/v2/builds/:build_id/workspace/preview/get.md)

---

[API](https://skmtc.dev/hud/apis/hud-platform.md) · [All operations](https://skmtc.dev/hud/apis/hud-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/hud/apis/hud-platform/revisions/50a2fbc0a044?raw)
