Skip to main content
Enumerates every file at the requested reference to help you build navigation or quick comparisons.
GET /api/v1/repos/files?ref=BRANCH_OR_SHA
Authorization: Bearer YOUR_JWT_TOKEN

Parameters

ParameterTypeDescription
refOptionalBranch name or commit SHA. If not specified, uses the repository’s default branch
ephemeralOptionalWhen true, resolves the ref under the ephemeral namespace

JWT Requirements

  • The JWT must include the repository in the repo claim
  • Requires git:read scope

Response

{
  "paths": ["README.md", "package.json", "src/index.js", "src/utils/helper.js"],
  "ref": "main"
}

Notes

  • Returns all files in the repository at the specified ref
  • Directories are not included in the list, only files
  • File paths are relative to the repository root
  • If no ref is specified, the repository’s default branch is used (typically main or master)
  • paths: Array of file paths in the repository
  • ref: The resolved reference (branch name or commit SHA) that was used

Error Responses

StatusDescription
404 Not FoundReference doesn’t exist
401 UnauthorizedInvalid JWT or missing git:read scope