Skip to main content
GET
/
repos
/
{owner}
/
{repo}
/
git
/
trees
/
{sha}
Get a tree
curl --request GET \
  --url https://gogs.example.com/api/v1/repos/{owner}/{repo}/git/trees/{sha} \
  --header 'Authorization: <api-key>'
{
  "sha": "<string>",
  "url": "<string>",
  "tree": [
    {
      "path": "<string>",
      "mode": "<string>",
      "type": "<string>",
      "size": 123,
      "sha": "<string>",
      "url": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Repository owner

repo
string
required

Repository name

sha
string
required

Tree SHA

Response

Success

sha
string
url
string
tree
object[]