Skip to main content
The relay serves the file routes. opc push and opc pull are clients for upload and download. Every path is relative to the workspace. Errors are JSON, {"error": {...}}.

List

depth is 1 to 10 and limit 1 to 100. The result is path, entries and nextCursor; pass nextCursor back as cursor. Each entry has:

Read one file

GET /files/{id}/file?path=<file> returns the bytes with Content-Type, Content-Length and an ETag.

Download an archive

GET /files/{id}/archive?path=<directory or file> streams a tar archive (application/x-tar). With Accept-Encoding: zstd or gzip the stream is compressed and Content-Encoding says how; zstd is preferred when both are offered.

Upload an archive

PUT /files/{id}/archive?path=<name> with a tar stream as the body unpacks the archive as one directory named name at the top of the workspace, beside the repositories.
The example leaves out authentication. The response is {"upload": {"path", "files", "bytes", "replaced"}, "seq"}. A failed upload changes nothing.