Parameters
| Parameter | Type | Description |
|---|---|---|
path | Required | The path to the file to read |
ref | Optional | Branch name or commit SHA. If not specified, uses the repository’s default branch |
ephemeral | Optional | When true, resolves the ref under the ephemeral namespace |
JWT Requirements
- The JWT must include the repository in the
repoclaim - Requires
git:readscope
Response
Returns raw file bytes as a streaming response with appropriateContent-Type header.
Notes
- Returns raw file bytes as streaming response
- If no
refis specified, the repository’s default branch is used (typicallymain)
Error Responses
| Status | Description |
|---|---|
404 Not Found | File or reference doesn’t exist |
401 Unauthorized | Invalid JWT or missing git:read scope |
400 Bad Request | Missing path parameter or invalid file path |