Xeonr Developer Docs
API SpecificationWorkspaces

Import Zip

POST
/containers.api.v1.WorkspaceService/ImportZip

Client stream: one ImportZipHeader, then zip bytes as chunks — or set source_url and the server pulls the zip itself (SSRF-guarded, http(s) only, public addresses only, at most 512 MiB). Unpacks under dest_path; entries escaping the destination are rejected. Returns files and bytes written.

Access: namespace OPERATOR or above (write); a workspace-scoped agent key may act only on the trees it was minted for

Authorization

BearerAuth
AuthorizationBearer <token>

A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC token for humans. The key's namespace and role are pinned server-side.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/connect+json

chunk?string

validate:skip no per-frame limit server-side; the whole body is currently unbounded

Formatbyte

Response Body

application/connect+json

application/connect+json

curl -X POST "https://containers.xeonr.io/containers.api.v1.WorkspaceService/ImportZip" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/connect+json" \  -d ''
{
  "filesWritten": 0,
  "bytesWritten": "string"
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}