LogoFreestyle
API Reference/Git

Get a tree object

Get a tree from the Git database with its entries.

GET/git/v1/repo/{repo}/git/trees/{hash}

Path Parameters

repoRequiredstring

The repository id

Format: "uuid"
hashRequiredstring

The object's hash

Response Body

200

Tree retrieved successfully

treeRequiredarray<Blob | Tree>

The tree's entries

shaRequiredstring

The tree's hash ID

400

Invalid request

messageRequiredstring

403

Forbidden

messageRequiredstring

404

Tree not found

messageRequiredstring

500

Internal server error

messageRequiredstring
curl -X GET "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/git/trees/<string>"

Tree retrieved successfully

{
  "tree": [
    {
      "path": "string",
      "sha": "string",
      "type": "blob"
    }
  ],
  "sha": "string"
}