GET
/
api
/
datasets
/
{datasetId}
/
chunks
curl --request GET \
  --url https://app.pathors.com/api/datasets/{datasetId}/chunks \
  --header 'x-api-key: <x-api-key>'
{
  "id": "<string>",
  "content": "<string>",
  "contentLength": 123
}

Preview Chunks

Retrieves all chunks that were created from a specific dataset.

Endpoint

GET /api/datasets/{datasetId}/chunks

Path Parameters

datasetId
string
required

The ID of the dataset to get chunks from

Headers

x-api-key
string
required

Your project API key for authentication

Response

Returns an array of chunks that were created from the dataset.

id
string

Unique identifier for the chunk

content
string

The text content of the chunk

contentLength
number

Length of the chunk content in characters

Example response:

[
  {
    "id": "chunk_abc123",
    "content": "This is the first chunk of content...",
    "contentLength": 256
  },
  {
    "id": "chunk_def456",
    "content": "This is the second chunk of content...",
    "contentLength": 312
  }
]

Error Responses

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

Usage Notes

  • This endpoint shows how your dataset has been split into chunks
  • Chunks are created automatically when a dataset is uploaded
  • Each chunk is optimized for semantic search
  • The chunks shown are the actual segments used for querying