Skip to main content
GET
/
api
/
knowledgebases
/
{knowledgebaseId}
/
datasets
Get Datasets
curl --request GET \
  --url https://app.pathors.com/api/knowledgebases/{knowledgebaseId}/datasets \
  --header 'x-api-key: <x-api-key>'
{
  "id": "<string>",
  "filename": "<string>",
  "fileUrl": "<string>",
  "extensionType": "<string>",
  "size": 123,
  "isParsed": true,
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
Retrieve all datasets that belong to a specific knowledgebase.

Endpoint

GET /api/knowledgebases/{knowledgebaseId}/datasets

Path Parameters

knowledgebaseId
string
required
The unique identifier of the knowledgebase to retrieve datasets from

Headers

x-api-key
string
required
Your project API key for authentication
Example request:
curl -X GET \
  -H "x-api-key: your_api_key" \
  https://your-domain.com/api/knowledgebases/kb_abc123/datasets

Response

Returns an array of datasets belonging to the specified knowledgebase.
id
string
Unique identifier for the dataset
filename
string
Name of the uploaded file
fileUrl
string
URL to access the dataset file
extensionType
string
File extension type (e.g., “pdf”, “txt”)
size
number
File size in bytes
isParsed
boolean
Whether the dataset has been processed and embedded
createdAt
string
ISO timestamp when the dataset was created
updatedAt
string
ISO timestamp when the dataset was last updated
Example response:
[
  {
    "id": "dataset_abc123",
    "filename": "company-handbook.pdf",
    "fileUrl": "https://your-domain.com/api/datasets/dataset_abc123.pdf",
    "extensionType": "pdf",
    "size": 2048000,
    "isParsed": true,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:35:00Z"
  }
]

Error Responses

Status CodeDescription
400Missing knowledgebase ID
401Invalid API key
404Knowledgebase not found or access denied
500Internal server error

Response Details

Processing Status

  • isParsed: true - Dataset has been fully processed and is available for search
  • isParsed: false - Dataset is still being processed in the background

File Access

  • Use the fileUrl to download the original uploaded file
  • The URL includes the dataset ID and file extension
  • Files are served with appropriate content types

Usage Notes

  • Only datasets belonging to the specified knowledgebase are returned
  • The knowledgebase must belong to your project (validated via API key)
  • Results are ordered by creation date (most recent first)
  • Processing status helps track which datasets are ready for use