GET
/
api
/
datasets
Get Datasets
curl --request GET \
  --url https://app.pathors.com/api/datasets \
  --header 'x-api-key: <x-api-key>'
{
  "id": "<string>",
  "filename": "<string>",
  "fileUrl": "<string>",
  "extensionType": "<string>",
  "size": 123,
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Get Datasets

Retrieves all datasets associated with a specific knowledgebase.

Endpoint

GET /api/datasets

Path Parameters

knowledgebaseId
string
required
The ID of the knowledgebase to get datasets from

Headers

x-api-key
string
required
Your project API key for authentication

Response

Returns an array of dataset objects.
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
Size of the file in bytes
createdAt
string
Timestamp when the dataset was created
updatedAt
string
Timestamp when the dataset was last updated
Example response:
[
  {
    "id": "dataset_abc123",
    "filename": "documentation.pdf",
    "fileUrl": "https://app.pathors.com/api/datasets/dataset_abc123.pdf",
    "extensionType": "pdf",
    "size": 1048576,
    "createdAt": "2024-03-15T08:00:00Z",
    "updatedAt": "2024-03-15T08:00:00Z"
  }
]

Error Responses

Status CodeDescription
401Invalid API key
404Knowledgebase not found
500Internal server error

Usage Notes

  • The response includes all datasets that have been uploaded to the knowledgebase
  • File URLs are temporary and may expire after a certain period
  • The size is reported in bytes
  • Timestamps are in ISO 8601 format