files
Repo files — presigned multipart upload/download against object storage, tree listing
GET /v1/repos/{owner}/{repo}/tree
List repo files
Flat file listing with sizes, etags and sha256 digests (paths are /-separated keys; there are no directory objects). Filter with prefix; paginate for large repos.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. |
prefix | query | string | Only paths starting with this prefix. |
limit | query | integer | Page size (tree listings allow larger pages). |
cursor | query | string | Opaque cursor from the previous page's |
Responses
POST /v1/repos/{owner}/{repo}/files/presign-upload
Presign a batch multipart upload
Requests presigned multipart upload URLs for up to 100 files. Client supplies each file's path, size and sha256 (content addressing — also the seam for the M5 dedupe precheck). Server returns, per file, an upload_id and part URLs (part_size bytes each, last part may be short). Upload the parts with HTTP PUT, collect the returned ETags, then call complete. Limits (v0): single file ≤ 50 GiB, part size 100 MiB.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. |
Request body
| Field | Type | Description |
|---|---|---|
files | array of PresignUploadFile |
Responses
| Status | Description | Body |
|---|---|---|
200 | Presigned upload targets, one per requested file. | PresignUploadResponse |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
413 | A file exceeds the size limit or the account is over quota. | Problem |
422 | Request failed validation. | Problem |
POST /v1/repos/{owner}/{repo}/files/complete
Complete a batch multipart upload
Finalizes multipart uploads previously presigned. Server completes the uploads in object storage, verifies etags, and upserts the RepoFile rows (existing paths are overwritten — repos have no revisions in v0).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. |
Request body
| Field | Type | Description |
|---|---|---|
uploads | array of CompletedUpload |
Responses
| Status | Description | Body |
|---|---|---|
200 | Files recorded. | CompleteUploadResponse |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
422 | Request failed validation. | Problem |
POST /v1/repos/{owner}/{repo}/files/presign-download
Presign downloads
Returns short-lived (1 h) presigned GET URLs for up to 100 repo file paths. All-or-nothing: any unknown path fails the whole request with 404 (missing paths listed in the problem detail). Anonymous works for public repos.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. |
Request body
| Field | Type | Description |
|---|---|---|
paths | array of FilePath |
Responses
| Status | Description | Body |
|---|---|---|
200 | Presigned download URLs. | PresignDownloadResponse |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
POST /v1/repos/{owner}/{repo}/files/delete
Delete files (batch unlink)
Unlinks up to 100 file rows from the repo. Content-addressed blobs are garbage-collected asynchronously once unreferenced. Unknown paths are ignored and reported back.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. |
Request body
| Field | Type | Description |
|---|---|---|
paths | array of FilePath |
Responses
| Status | Description | Body |
|---|---|---|
200 | Deletion summary. | FileDeleteResponse |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
Schemas (17)
The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.
TreePage
| Field | Type | Description |
|---|---|---|
items | array of RepoFileEntry | |
next_cursor | string | null |
PresignUploadRequest
| Field | Type | Description |
|---|---|---|
files | array of PresignUploadFile |
PresignUploadResponse
| Field | Type | Description |
|---|---|---|
uploads | array of UploadTarget | |
expires_at | string (date-time) | When the presigned part URLs expire. |
CompleteUploadRequest
| Field | Type | Description |
|---|---|---|
uploads | array of CompletedUpload |
CompleteUploadResponse
| Field | Type | Description |
|---|---|---|
files | array of RepoFileEntry |
PresignDownloadRequest
| Field | Type | Description |
|---|---|---|
paths | array of FilePath |
PresignDownloadResponse
| Field | Type | Description |
|---|---|---|
files | array of DownloadTarget |
FileDeleteRequest
| Field | Type | Description |
|---|---|---|
paths | array of FilePath |
FileDeleteResponse
RepoFileEntry
PresignUploadFile
UploadTarget
| Field | Type | Description |
|---|---|---|
path | FilePath | |
upload_id | string | Multipart upload id; echo it back on |
part_size | integer | Bytes per part (v0 fixed 100 MiB; last part may be short). |
parts | array of UploadPart |
CompletedUpload
| Field | Type | Description |
|---|---|---|
path | FilePath | |
upload_id | string | |
parts | array of CompletedPart |
DownloadTarget
| Field | Type | Description |
|---|---|---|
path | FilePath | |
url | string (uri) | |
expires_at | string (date-time) |
Sha256
Lowercase hex SHA-256.
UploadPart
| Field | Type | Description |
|---|---|---|
part_number | integer | |
url | string (uri) |
CompletedPart
| Field | Type | Description |
|---|---|---|
part_number | integer | |
etag | string |