Routes
HTTP endpoints for uploads and files.
Uploads
POST /uploads— create an upload session and receive strategy details.GET /uploads/:uploadId— read upload status and progress.POST /uploads/:uploadId/progress— record client-side progress (direct uploads).POST /uploads/:uploadId/parts— get signed URLs for multipart uploads.POST /uploads/:uploadId/parts/complete— record uploaded parts.POST /uploads/:uploadId/complete— finalize upload and mark file ready.POST /uploads/:uploadId/abort— abort an upload.PUT /uploads/:uploadId/content— server-stream (proxy) bytes to storage.
Notes:
POST /uploadsis idempotent only when a checksum is provided; if metadata matches, the existing upload is returned to support resume without creating a new storage session.- If a file already exists for the key,
POST /uploadsandPOST /uploads/:uploadId/completereturnFILE_ALREADY_EXISTS.
Files
GET /files— list files with cursor pagination and optional prefix filtering.GET /files/:fileKey— fetch file metadata.PATCH /files/:fileKey— update file metadata.DELETE /files/:fileKey— delete a file (idempotent).GET /files/:fileKey/download-url— signed download URL (if supported).GET /files/:fileKey/content— server-stream (proxy) downloads (if supported).
Notes:
POST /filesdoes not implement idempotent matching; active uploads and existing files returnUPLOAD_ALREADY_ACTIVEorFILE_ALREADY_EXISTS.
Error codes
UPLOAD_NOT_FOUNDUPLOAD_ALREADY_ACTIVEUPLOAD_METADATA_MISMATCHFILE_NOT_FOUNDFILE_ALREADY_EXISTSUPLOAD_EXPIREDUPLOAD_INVALID_STATESIGNED_URL_UNSUPPORTEDSTORAGE_ERRORINVALID_FILE_KEYINVALID_CHECKSUM