dots.v2.agents.sessions.bySession_id().workspace.download.get()
Generated on 5 Nov 2026
from DoTs version
v1.23.0
Usage
client.v2.agents.sessions.bySession_id(session_id).workspace.download.get(requestConfiguration?: RequestConfiguration<DownloadRequestBuilderGetQueryParameters>): Promise<undefined | ArrayBuffer>Description
Streams the workspace payload back as application/octet-stream using chunked transfer encoding, followed by a fixed integrity footer.
Response body layout: <payload> + <footer>, where the footer is exactly 73 bytes: DOWSSHA1 (8 bytes) + 64-char lowercase SHA-256 hex + \n. The client MUST strip the trailing 73 bytes before saving, verify SHA-256(payload) equals the footer digest, and treat a tail that does not match this shape (magic + 64 hex + newline) as a failed (truncated/corrupt) transfer.
Other metadata:
X-Workspace-Is-Archive: truewhen the payload is a tar archive.X-Workspace-Size-Bytesis a progress hint (not Content-Length) and excludes the footer.- The
X-Content-Sha256trailer also carries the digest but is best-effort: edge proxies may strip HTTP trailers, so the body footer is authoritative.
Concurrent transfers (upload + download) are capped server-side; over the cap the request blocks and may return 503.
Parameters
Path Parameters
session_idstring requiredExample:
a1b2c3d4-e5f6-7890-abcd-ef1234567890The session UUID.
Query Parameters
pathstring requiredExample:
exampleSource path inside the sandbox workspace. Relative paths resolve under the workspace root; paths that escape the workspace are rejected. Required.
asArchiveboolean optionalExample:
trueIf true, the guest returns a tar stream of
path(e.g. for a directory). Defaults to false (single file).
Request Sample
More Information
See /v2/agents/sessions/{session_id}/workspace/download in the API reference for additional detail on responses, headers, parameters, and more.