Skip to content

List a directory

GET
/api/orgs/{org}/projects/{project}/tree
curl --request GET \
--url 'https://api.wrktr.com/api/orgs/example/projects/example/tree?branch=example&path=example' \
--header 'Authorization: Bearer <token>'

The directory at the branch head; path “” is the root.

org
required
string
project
required
string
branch
required
string
path
required
string

TreeAtHead

Media typeapplication/json
object
path
required
string
headSha
required
string
entries
required
Any of:
Array<object>
object
name
required
string
mode
required
string
sha
required
string
isTree
required
boolean
Examplegenerated
{
"path": "example",
"headSha": "example",
"entries": [
{
"name": "example",
"mode": "example",
"sha": "example",
"isTree": true
}
]
}

Unauthorized

Media typeapplication/json
object
_tag
required
string
Allowed values: Unauthorized
message
required
string
Example
{
"_tag": "Unauthorized"
}

ProjectNotFound | BranchNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ProjectNotFound
project
required
string
Example
{
"_tag": "ProjectNotFound"
}