Parameters
Branch name or commit SHA to resolve the file tree against. If omitted, the server falls back to the repository’s
default_branch, then HEAD, then main.When
true, branch refs are resolved under the ephemeral namespace before lookup. This changes ref resolution behavior — it is not a filter. Passing ephemeral=true without a valid ref that maps to an ephemeral branch returns a 400. Any value other than true or false is also a 400.JWT Requirements
- The JWT must include the repository in the
repoclaim — the repo is not inferred from the URL - Requires
git:readscope
Response
Response fields
files[] — one entry per file in the tree at the resolved ref.
| Field | Type | Description |
|---|---|---|
path | string | File path relative to the repository root |
mode | string | Git file mode (e.g. 100644 for a regular file, 100755 for executable) |
size | number | File size in bytes |
last_commit_sha | string | SHA of the most recent commit that modified this file |
commits — a map of commit SHA → commit metadata. Each SHA that appears in files[].last_commit_sha has a corresponding entry here. The map is deduplicated: if many files share the same last-touching commit, that commit appears once.
| Field | Type | Description |
|---|---|---|
author | string | Commit author name |
date | string | Commit timestamp in RFC 3339 / ISO 8601 format |
message | string | Full commit message |
ref — the ref the server actually resolved and used, regardless of what was passed in the query string.
Pagination
This endpoint is unpaginated. The full file list is returned in a single response — there are nocursor, next_cursor, limit, or has_more fields.
For large repositories this can produce a significant payload. If your repo has tens of thousands of files or a high rate of unique last-touching commits, account for response size in your client and consider caching the result on your side.
Error Responses
Invalid
ephemeral value (anything other than true/false), or ephemeral=true used with a ref that cannot be resolved in the ephemeral namespace.JWT is missing or invalid.
JWT is valid but does not carry
git:read scope.Repository not found, or the specified ref (branch or SHA) does not exist.
Request was made with a method other than
GET.Request was canceled while the server was preparing the repository.
The repository has too many unique last-touching commit SHAs to expand into the
commits map. Contact support.Repository is thawing or syncing, a replica could not be selected, or storage is temporarily unavailable. Retry with backoff.
Unexpected server-side failure.
{"error": "<message>"}.