Skip to main content
POST
/
github
/
read
Github Read
curl --request POST \
  --url https://apigcp.trynia.ai/v2/github/read \
  --header 'Content-Type: application/json' \
  --data '
{
  "repository": "<string>",
  "path": "<string>",
  "ref": "HEAD",
  "start_line": 2,
  "end_line": 2
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Body

application/json
repository
string
required

Repository in owner/repo format

path
string
required

File path within the repository

ref
string
default:HEAD

Branch, tag, or commit SHA

start_line
integer | null

1-based start line

Required range: x >= 1
end_line
integer | null

1-based end line (inclusive)

Required range: x >= 1

Response

Successful Response