List all repository trees in a project
GET
/api/v4/projects/{id}/repository/tree
Lists all repository files and directories in a specified project. This endpoint can be accessed without authentication if the repository is publicly accessible. This command provides essentially the same features as the git ls-tree command.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Query Parameters
Section titled “ Query Parameters ” ref
string
The name of a repository branch or tag, if not given the default branch is used
Example
main path
string
The path of the tree
Example
files/html recursive
boolean
Used to get a recursive tree
page
integer
Current page number
Example
1 per_page
integer
Number of items per page
Example
20 pagination
string
Specify the pagination method (“none” is only valid if “recursive” is true)
page_token
string
Record from which to start the keyset pagination
Example
a1e8f8d745cc87e3a9248358d9352bb7f9a0aebaResponses
Section titled “ Responses ”OK
Media type application/json
object
id
string
name
string
type
string
path
string
mode
string
Example
{ "id": "a1e8f8d745cc87e3a9248358d9352bb7f9a0aeba", "name": "html", "type": "tree", "path": "files/html", "mode": "040000"}Bad Request
Not Found