Gets the tree of a repository.
GET
/repos/{owner}/{repo}/git/trees/{sha}
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” owner
required
string
Owner of the repo
repo
required
string
Name of the repo
sha
required
string
Sha of the commit
Query Parameters
Section titled “ Query Parameters ” recursive
boolean
Show all directories and files
page
integer
Page number; the ‘truncated’ field in the response will be true if there are still more items after this page, false if the last page
per_page
integer
Number of items per page
Responses
Section titled “ Responses ”GitTreeResponse
Media type application/json
GitTreeResponse returns a git tree
object
page
integer format: int64
sha
string
total_count
integer format: int64
tree
Array<object>
GitEntry represents a git tree
object
mode
string
path
string
sha
string
size
integer format: int64
type
string
url
string
truncated
boolean
url
string
Example generated
{ "page": 1, "sha": "example", "total_count": 1, "tree": [ { "mode": "example", "path": "example", "sha": "example", "size": 1, "type": "example", "url": "example" } ], "truncated": true, "url": "example"}APIError is error format response
Media type application/json
APIError is an api error with a message
object
message
string
url
string
Example generated
{ "message": "example", "url": "example"}APINotFound is a not found error response
Media type application/json
object
errors
Array<string>
message
string
url
string
Example generated
{ "errors": [ "example" ], "message": "example", "url": "example"}