跳轉到主要內容
GET
/
v1
/
projects
/
{projectId}
/
knowledgebases
/
{knowledgebaseId}
/
datasets
列出資料集
curl --request GET \
  --url https://api.pathors.com/v1/projects/{projectId}/knowledgebases/{knowledgebaseId}/datasets \
  --header 'Authorization: <authorization>'
{
  "id": "<string>",
  "filename": "<string>",
  "fileUrl": "<string>",
  "extensionType": "<string>",
  "size": 123,
  "isParsed": true,
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

請求

GET https://api.pathors.com/v1/projects/{projectId}/knowledgebases/{knowledgebaseId}/datasets

路徑參數

projectId
string
必填
專案 ID
knowledgebaseId
string
必填
知識庫 ID

標頭

Authorization
string
必填
使用您的 Developer Key 進行 Bearer 令牌認證

回應

回傳資料集的陣列,依建立日期排序(最新的在最前面)。
id
string
資料集的唯一識別符
filename
string
原始上傳的檔案名稱
fileUrl
string
下載原始檔案的 URL
extensionType
string
檔案副檔名(例如 pdftxt
size
number
檔案大小(位元組)
isParsed
boolean
當資料集已完成切割成區塊並嵌入後為 true;仍在處理中時為 false
createdAt
string
資料集建立時的 ISO 時間戳記
updatedAt
string
資料集最後更新時的 ISO 時間戳記

範例

curl https://api.pathors.com/v1/projects/{projectId}/knowledgebases/kb_abc123/datasets \
  -H "Authorization: Bearer dk_your_key"
[
  {
    "id": "dataset_abc123",
    "filename": "company-handbook.pdf",
    "fileUrl": "https://api.pathors.com/datasets/dataset_abc123.pdf",
    "extensionType": "pdf",
    "size": 2048000,
    "isParsed": true,
    "createdAt": "2026-01-15T10:30:00Z",
    "updatedAt": "2026-01-15T10:35:00Z"
  }
]