---
title: "Get Volume File Content"
method: GET
path: "/api/v1/runtime/volume/file"
tags: ["runtime"]
---

# Get Volume File Content

`GET /api/v1/runtime/volume/file`

Read a text preview for a single file from the runtime volume.

## Query parameters

- `path` string, required — Absolute or volume-relative file path to preview from the runtime volume.
- `max_bytes` integer — Maximum number of bytes of text content to return in the preview response.
- `provider` 'daytona', nullable — Optional runtime volume backend override. Defaults to the active sandbox provider.

## Response `200`

Successful Response

- VolumeFileContentResponse — Response for runtime volume file-content preview endpoint.
  - `provider` 'daytona', required — Runtime volume backend used to satisfy the request.
  - `path` string, required — Normalized file path used for the preview request.
  - `mime` string, required — Detected MIME type for the returned content.
  - `size` integer, required — File size in bytes reported by the provider.
  - `sha256` string, nullable — SHA-256 hex digest of the full file bytes before truncation.
  - `encoding` string, nullable — Content encoding: 'utf-8' for clean text, 'utf-8-lossy' when replacement characters were introduced, or 'binary' for non-text files.
  - `content` string, required — UTF-8 text preview returned for the requested file. Empty for binary files.
  - `binary` boolean — True when the file was detected as binary; content will be empty.
  - `truncated` boolean — Whether the returned file content was truncated to respect max_bytes.

## Other responses

- `400` — The requested file path is invalid or points to a directory.
- `401` — Authentication is required or the provided token is invalid.
- `403` — The requested file is outside the canonical runtime volume roots.
- `404` — The requested runtime volume file does not exist.
- `422` — Validation Error
- `502` — The runtime volume provider failed to read the requested file.
- `503` — Runtime services are unavailable because server startup is incomplete.
- `504` — Volume file reading timed out before the backend returned a result.

---

[API](https://skmtc.net/qredence/apis/fleet-rlm.md) · [All operations](https://skmtc.net/qredence/apis/fleet-rlm/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qredence/fleet-rlm/versions/62e8c152aa18/schema)
