---
title: "Preview a text file"
method: GET
path: "/files/preview"
tags: ["pv"]
---

# Preview a text file

`GET /files/preview`

## Request

- The document declares no server URL.
- Auth: none declared

Return the first max_bytes of a text file as UTF-8; 415 for non-text types

## Query parameters

- `base_path` string, required
- `max_bytes` integer
- `rel_path` string, required

## Response `200`

OK

## Changes

- **2026-07-23** `a12b0f392336`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tencentblueking/apis/daemon-api/changes/files/preview/get.md)

---

[API](https://skmtc.dev/tencentblueking/apis/daemon-api.md) - [All operations](https://skmtc.dev/tencentblueking/apis/daemon-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tencentblueking/apis/daemon-api/revisions/b7207bf13d2c?raw)
