pydo.harness.create_session_workspace_transfer()
Generated on 13 Nov 2026
from pydo version
v0.46.0
Usage
client.harness.create_session_workspace_transfer(
session_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
body={
"direction": "upload",
"path": "example",
"is_archive": True,
...,
},
)Description
Creates an asynchronous, object-storage-backed transfer for payloads larger than the streaming path supports (> ~50 MiB). Bulk bytes never traverse harness-api: the client PUTs/GETs presigned DO Spaces URLs directly.
Set direction to upload or download.
upload: responds 201 withtransfer_id+part_size; the client then requests per-part presigned PUT URLs, uploads them to Spaces, and callscommit.download: responds 202 withtransfer_id; the client polls GET untilcompletedand then fetchesdownload_urlfrom Spaces.
Upload, download, and cancel are live.
Parameters
session_idstring requiredExample:
a1b2c3d4-e5f6-7890-abcd-ef1234567890The session UUID.
directionstring requiredTransfer direction.
pathstring requiredExample:
exampleWorkspace-relative path. Destination for upload, source for download. Paths that escape the workspace root are rejected.
is_archiveboolean optionalExample:
TrueUpload only. When true, the payload is a tar the guest extracts at
path.as_archiveboolean optionalExample:
TrueDownload only. When true,
pathis exported as a tar stream.size_bytesinteger optionalExample:
4Optional total payload size, as a JSON number. Validated against the maximum staged object size (50 GiB); a larger value returns 413.
sha256string optionalExample:
exampleOptional lowercase hex SHA-256 of the full payload. If set on an upload, it must match on commit.
Request Sample
Response Example
More Information
See /v2/agents/sessions/{session_id}/workspace/transfers in the API reference for additional detail on responses, headers, parameters, and more.