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 typeapplication/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
Examplegenerated
{ "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 typeapplication/json
APIError is an api error with a message
object
message
string
url
string
Examplegenerated
{ "message": "example", "url": "example"}APINotFound is a not found error response
Media typeapplication/json
object
errors
Array<string>
message
string
url
string
Examplegenerated
{ "errors": [ "example" ], "message": "example", "url": "example"}