Get a tree
Returns a single tree using the SHA1 value for that tree.
If truncated is true in the response then the number of items in the tree array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
Note: The limit for the tree array is 100,000 entries with a maximum size of 7 MB when using the recursive parameter.
Path parameters
The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Query parameters
Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in :tree_sha. For example, setting recursive to any of the following will enable returning objects or subtrees: 0, 1, "true", and "false". Omit this parameter to prevent recursively returning objects or subtrees.
Response
Response
Example response
{
"tree": [
{
"path": "file.rb",
"mode": "100644",
"type": "blob",
"size": 30,
"sha": "44b4fc6d56897b048c772eb4087f854f46256132",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132",
"properties": {
"path": {
"type": "string"
},
"mode": {
"type": "string"
},
"type": {
"type": "string"
},
"size": {
"type": "integer"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"path",
"mode",
"type",
"sha",
"url",
"size"
]
}
]
}