跳轉到

取得所有知識版本列表

此 API 用於取得目前已上傳至 Storage 中的所有檔案清單。每個檔案都包含其唯一 ID、檔名、檔案類型、上傳時間等基本資訊,可用於後續建立 Fileset、檢查上傳狀態或執行維運管理。

curl -X 'GET' \
  'http://127.0.0.1:8000/v1/filesets?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

Query Parameters

Field Type Note Required
limit int 1 - 10000,預設為 10000 false
order string asc or desc,預設為 desc false
after string uuid false
before string uuid false

Response Body

{
  "object": "list",
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "The Pragmatic Programmer.pdf",
      "object": "fileset",
      "metadata": {
        "embedding_model": "apmic-embedding-v1",
        "parsing_mode": "HQ",
        "fail_reason": null,
        "fail_detail": {}
      },
      "state": "draft",
      "created_at": "2025-01-01T00:00:00.000Z",
      "committed_at": "2025-01-01T00:00:00.000Z",
      "updated_at": "2025-01-01T00:00:00.000Z",
      "file_counts": {
        "draft": 1,
        "queued": 0,
        "processing": 0,
        "completed": 0,
        "failed": 0,
        "total": 0
      }
    }
  ],
  "first_id": "c7ea032b-eb16-4ccb-94a6-88af66db5d22",
  "last_id": "a1ecdb5d-e2a5-4aec-8925-b0648a5c0e21",
  "has_more": true
}

Field Explanation

Field Detail
data[] 請參考「知識版本物件」章節列表
first_id 第一個知識版本的 ID
last_id 最後一個知識版本的 ID
has_more 是否有更多的知識版本

備註: file_counts 是依據 fileset file state 計算,而非 File 物件本身的解析狀態。