> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pathors.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 預覽區塊

> 列出從資料集擷取出的區塊

回傳資料集處理時所產生的區塊。適合用於預覽文件如何被切割、除錯非預期的搜尋結果，或稽核區塊內容。

## 請求

```bash theme={null}
GET https://api.pathors.com/v1/projects/{projectId}/knowledgebases/{knowledgebaseId}/datasets/{datasetId}/chunks
```

### 路徑參數

<ParamField path="projectId" type="string" required>專案 ID</ParamField>
<ParamField path="knowledgebaseId" type="string" required>包含此資料集的知識庫</ParamField>
<ParamField path="datasetId" type="string" required>要預覽的資料集</ParamField>

### 標頭

<ParamField header="Authorization" type="string" required>
  使用您的 Developer Key 進行 Bearer 令牌認證
</ParamField>

## 回應

依原始文件順序回傳區塊。

<ResponseField name="id" type="string">區塊的唯一識別符</ResponseField>
<ResponseField name="content" type="string">區塊的文字內容（處理後，而非原始檔案內容）</ResponseField>
<ResponseField name="contentLength" type="number">區塊內容的字元長度</ResponseField>

<ResponseField name="isEnabled" type="boolean">
  該區塊是否參與搜尋。已停用的區塊會被排除在查詢結果之外。
</ResponseField>

### 範例

```bash theme={null}
curl https://api.pathors.com/v1/projects/{projectId}/knowledgebases/kb_abc123/datasets/dataset_xyz789/chunks \
  -H "Authorization: Bearer dk_your_key"
```

```json theme={null}
[
  {
    "id": "chunk_abc123",
    "content": "This is the first chunk of text extracted from the document...",
    "contentLength": 127,
    "isEnabled": true
  }
]
```

資料集必須屬於指定的知識庫 — 跨知識庫存取會回傳 `403`。
