Get a file from a GitHub repository for a Git Sync installation
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
installationIdstringRequired
Identifier of the installation
accountNamestringRequired
repositoryNamestringRequired
Query parameters
pathstringRequired
refstringRequired
Responses
200
File found in the selected GitHub repository
application/json
A file found in a Git Sync repository at a specific ref.
namestringRequired
pathstringRequired
shastringRequired
sizenumberRequired
401
Unauthorized
application/json
404
Not Found
application/json
get/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/file
GET /v1/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/file?path=text&ref=text HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"name": "text",
"path": "text",
"sha": "text",
"size": 1
}Last updated
Was this helpful?