v2
latestOpenAPI 3.0.02026-08-013312111.4 MBGet the root directory of the main branch
This endpoint redirects the client to the directory listing of the root directory on the main branch.
This is equivalent to directly hitting /2.0/repositories/{username}/{repo_slug}/src/{commit}/{path} without having to know the name or SHA1 of the repo's main branch.
To create new commits, POST to this endpoint
Query parameters
Instead of returning the file's contents, return the (json) meta data for it.
Response
If the path matches a file, then the raw contents of the file are returned (unless the format=meta query parameter was provided, in which case a json document containing the file's meta data is returned). If the path matches a directory, then a paginated list of file and directory entries is returned (if the format=meta query parameter was provided, then the json document containing the directory's meta data is returned).