Skip to main content
GET
/
data-sources
/
{source_id}
/
read
Read data source content
curl --request GET \
  --url https://apigcp.trynia.ai/v2/data-sources/{source_id}/read \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "path": "<string>",
  "url": "<string>",
  "content": "<string>",
  "total_lines": 123,
  "returned_lines": [
    123
  ],
  "truncated": true,
  "split": "<string>",
  "row_index": 123,
  "chunks_returned": 123,
  "source_type": "documentation",
  "metadata": {
    "url": "<string>",
    "source_id": "<string>",
    "chunks_found": 123,
    "title": "<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 (UUID, display name, or URL)

Query Parameters

path
string
required

Virtual path to the page (e.g., "/api/authentication.md")

line_start
integer

Start line number (1-based, inclusive). Use with line_end for slicing.

Required range: x >= 1
line_end
integer

End line number (1-based, inclusive). Use with line_start for slicing.

Required range: x >= 1
max_length
integer

Maximum number of characters to return (100-100000). Content will be truncated if exceeded.

Required range: 100 <= x <= 100000

Response

Page content retrieved successfully

success
boolean
path
string

The virtual path requested

url
string

The actual URL of the page

content
string

Full or partial content of the documentation page

total_lines
integer

Total number of lines in the document

returned_lines
integer[]

[start_line, end_line] range of returned content

Required array length: 2 elements
truncated
boolean

Whether content was truncated due to max_length limit

split
string

Dataset split name (HuggingFace datasets only)

row_index
integer

Row index in the dataset (HuggingFace datasets only)

chunks_returned
integer

Number of chunks returned (HuggingFace datasets only)

source_type
enum<string>

Type of the data source

Available options:
documentation,
huggingface_dataset,
research_paper
metadata
object