Skip to content
Docs menu

files

Repo files — presigned multipart upload/download against object storage, tree listing

5 operations · 17 schemas

GET /v1/repos/{owner}/{repo}/tree

List repo files

getRepoTree · scope none

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

getRepoTree parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug.

prefixquerystring

length ≤ 1024

Only paths starting with this prefix.

limitqueryinteger

default 500 · ≥ 1 · ≤ 1000

Page size (tree listings allow larger pages).

cursorquerystring

length ≤ 512

Opaque cursor from the previous page's next_cursor.

Responses

getRepoTree responses
StatusDescriptionBody
200

Page of file entries.

TreePage
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

POST /v1/repos/{owner}/{repo}/files/presign-upload

Presign a batch multipart upload

presignUpload · scope key:write

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

presignUpload parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug.

Request body

application/json · required · PresignUploadRequest

presignUpload request body
FieldTypeDescription
filesrequiredarray of PresignUploadFile

items 1–100

Responses

presignUpload responses
StatusDescriptionBody
200

Presigned upload targets, one per requested file.

PresignUploadResponse
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
413

A file exceeds the size limit or the account is over quota.

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/repos/{owner}/{repo}/files/complete

Complete a batch multipart upload

completeUpload · scope key:write

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

completeUpload parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug.

Request body

application/json · required · CompleteUploadRequest

completeUpload request body
FieldTypeDescription
uploadsrequiredarray of CompletedUpload

items 1–100

Responses

completeUpload responses
StatusDescriptionBody
200

Files recorded.

CompleteUploadResponse
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/repos/{owner}/{repo}/files/presign-download

Presign downloads

presignDownload · scope none

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

presignDownload parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug.

Request body

application/json · required · PresignDownloadRequest

presignDownload request body
FieldTypeDescription
pathsrequiredarray of FilePath

items 1–100

Responses

presignDownload responses
StatusDescriptionBody
200

Presigned download URLs.

PresignDownloadResponse
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/repos/{owner}/{repo}/files/delete

Delete files (batch unlink)

deleteFiles · scope key:write

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

deleteFiles parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug.

Request body

application/json · required · FileDeleteRequest

deleteFiles request body
FieldTypeDescription
pathsrequiredarray of FilePath

items 1–100

Responses

deleteFiles responses
StatusDescriptionBody
200

Deletion summary.

FileDeleteResponse
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

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

object

TreePage fields
FieldTypeDescription
itemsrequiredarray of RepoFileEntry
next_cursorrequiredstring | null

PresignUploadRequest

object

PresignUploadRequest fields
FieldTypeDescription
filesrequiredarray of PresignUploadFile

items 1–100

PresignUploadResponse

object

PresignUploadResponse fields
FieldTypeDescription
uploadsrequiredarray of UploadTarget
expires_atrequiredstring (date-time)

When the presigned part URLs expire.

CompleteUploadRequest

object

CompleteUploadRequest fields
FieldTypeDescription
uploadsrequiredarray of CompletedUpload

items 1–100

CompleteUploadResponse

object

CompleteUploadResponse fields
FieldTypeDescription
filesrequiredarray of RepoFileEntry

PresignDownloadRequest

object

PresignDownloadRequest fields
FieldTypeDescription
pathsrequiredarray of FilePath

items 1–100

PresignDownloadResponse

object

PresignDownloadResponse fields
FieldTypeDescription
filesrequiredarray of DownloadTarget

FileDeleteRequest

object

FileDeleteRequest fields
FieldTypeDescription
pathsrequiredarray of FilePath

items 1–100

FileDeleteResponse

object

FileDeleteResponse fields
FieldTypeDescription
deletedrequiredarray of FilePath
missingrequiredarray of FilePath

Requested paths that did not exist (ignored).

RepoFileEntry

object

RepoFileEntry fields
FieldTypeDescription
pathrequiredFilePath
sizerequiredinteger

≥ 0

Bytes.

etagstring | null

Object-store ETag (multipart ETags are not content hashes).

sha256Sha256 | null
mimestring | null

length ≤ 255

Detected media type.

updated_atrequiredstring (date-time)

PresignUploadFile

object

PresignUploadFile fields
FieldTypeDescription
pathrequiredFilePath
sizerequiredinteger

≥ 0 · ≤ 53687091200

Bytes; v0 single-file limit 50 GiB.

sha256requiredSha256
content_typestring | null

length ≤ 255

UploadTarget

object

UploadTarget fields
FieldTypeDescription
pathrequiredFilePath
upload_idrequiredstring

Multipart upload id; echo it back on complete.

part_sizerequiredinteger

Bytes per part (v0 fixed 100 MiB; last part may be short).

partsrequiredarray of UploadPart

CompletedUpload

object

CompletedUpload fields
FieldTypeDescription
pathrequiredFilePath
upload_idrequiredstring
partsrequiredarray of CompletedPart

items ≥ 1

DownloadTarget

object

DownloadTarget fields
FieldTypeDescription
pathrequiredFilePath
urlrequiredstring (uri)
expires_atrequiredstring (date-time)

Sha256

string

pattern ^[a-f0-9]{64}$

Lowercase hex SHA-256.

UploadPart

object

UploadPart fields
FieldTypeDescription
part_numberrequiredinteger

≥ 1

urlrequiredstring (uri)

CompletedPart

object

CompletedPart fields
FieldTypeDescription
part_numberrequiredinteger

≥ 1

etagrequiredstring