Skip to main content
GET
/
repositories
/
{repository_id}
/
content
Get repository file content
curl --request GET \
  --url https://apigcp.trynia.ai/v2/repositories/{repository_id}/content \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "content": "<string>",
  "metadata": {
    "file_path": "<string>",
    "language": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

repository_id
string
required

Repository identifier in owner/repo format

Query Parameters

path
string
required

Path to the file within the repository

branch
string

Branch to read from (optional)

ref
string

Git ref to read from (branch, tag, or commit)

Response

File content retrieved successfully

success
boolean
content
string

Full file content

metadata
object