Skip to main content
GET
/
data-sources
/
{source_id}
/
tree
Get data source tree structure
curl --request GET \
  --url https://apigcp.trynia.ai/v2/data-sources/{source_id}/tree \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "tree": {},
  "tree_string": "<string>",
  "tree_type": "documentation",
  "base_url": "<string>",
  "page_count": 123,
  "dataset_id": "<string>",
  "owner": "<string>",
  "description": "<string>",
  "splits": [
    "<string>"
  ],
  "columns": [
    "<string>"
  ],
  "row_count": 123,
  "indexed_row_count": 123,
  "sampling_strategy": "<string>"
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

source_id
string
required

Flexible data source identifier. Can be:

  • UUID (e.g., "550e8400-e29b-41d4-a716-446655440000")
  • Display name (e.g., "Vercel AI SDK - Core")
  • URL (e.g., "https://docs.trynia.ai/")

Response

Tree structure retrieved successfully

success
boolean
tree
object

Nested tree structure of documentation pages

tree_string
string

Formatted text representation of the tree

tree_type
enum<string>

Type of tree structure returned

Available options:
documentation,
huggingface_dataset
base_url
string

Base URL of the documentation (documentation sources only)

page_count
integer

Total number of indexed pages (documentation sources only)

dataset_id
string

Dataset identifier (HuggingFace datasets only)

owner
string | null

Dataset owner/organization (HuggingFace datasets only)

description
string | null

Dataset description (HuggingFace datasets only)

splits
string[]

Available dataset splits (HuggingFace datasets only)

columns
string[]

Dataset column names (HuggingFace datasets only)

row_count
integer

Total number of rows in dataset (HuggingFace datasets only)

indexed_row_count
integer

Number of rows actually indexed (HuggingFace datasets only)

sampling_strategy
string | null

Sampling strategy used (full or sampled) (HuggingFace datasets only)