# 取得單一知識版本的檔案列表

此 API 用於查詢指定 Fileset 中所包含的所有檔案。

```javascript
curl -X 'GET' \
  'http://127.0.0.1:8000/v1/fileset/{fileset_id}/files?limit=20&order=desc' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <your-api-key>'
```

#### Request Headers

| **Key** | **Value** |
| --- | --- |
| Request Method | GET |
| accept | application/json |
| Authorization | Bearer &lt;your-api-key> |

#### Query Parameters

| **Field** | **Type** | **Note** | **Required** |
| --- | --- | --- | --- |
| fileset_id | string | uuid | true |
| limit | int | 1 - 10000，預設為 10000 | false |
| order | string | asc or desc，預設為 desc | false |
| after | string | uuid | false |
| before | string | uuid | false |
| file_state | string | 檔案的狀態，包含 draft、queued、processing、completed、failed | false |

#### Response Body

```javascript
{
  "object": "fileset.file",
  "id": "18b8b0f0-83c1-41a0-ba58-40774c8dfb99",
  "filename": "2024清明.pdf",
  "filetype": "application/pdf",
  "bytes": 200273,
  "metadata": {
    "parsed_results": {
      "HQ": {
        "parsing_state": "completed",
        "character_count": 2639,
        "page_count": 5,
        "failed_page_numbers": []
      },
      "LQ": {
        "parsing_state": "draft"
      }
    },
    "fail_detail": []
  },
  "state": "completed",
  "used_quality": "HQ",
  "purpose": "user_data",
  "created_at": "2025-12-02T03:15:01.975741Z",
  "expires_at": null
}
```

**Field Explanation**

| **Field** | **Detail** |
| --- | --- |
| data[] | 請參考「檔案物件」章節列表 |
| object | 固定為 fileset.file |
| has_more | 知識版本是否有更多的檔案 |
| state | 該 file 在此 fileset 內的 commit 狀態 |
| used_quality | 此 file 在該 fileset commit 時實際採用的解析品質，可能為 null / HQ / LQ / STD |
