pydo.harness.get_session_workspace_download()
Generated on 6 Nov 2026
from pydo version
v0.45.0
Usage
client.harness.get_session_workspace_download(
session_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
path="example",
as_archive=None,
)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
session_idstring requiredExample:
a1b2c3d4-e5f6-7890-abcd-ef1234567890The session UUID.
pathstring requiredExample:
exampleSource path inside the sandbox workspace. Relative paths resolve under the workspace root; paths that escape the workspace are rejected. Required.
as_archiveboolean optionalExample:
TrueIf true, the guest returns a tar stream of
path(e.g. for a directory). Defaults to false (single file).
More Information
See /v2/agents/sessions/{session_id}/workspace/download in the API reference for additional detail on responses, headers, parameters, and more.