Get a download link for a workspace file
Return a short-lived presigned URL that downloads one workspace file as an attachment directly from the deployment’s object store, for files too large or too binary for the proxied download. The scope rules are the download route’s (sessionId, repo, containment, .git). When the store does not already hold this revision of the file, the owning daemon uploads it first on a URL the control plane signs; the control plane sees only URLs. Pass poll: true to get 202 with an operationId while that upload runs, then poll GET /agents/{id}/workspace/file/transfer/{operationId}; without it the call waits for the upload, which may take minutes. A repeated request for a revision already uploading joins that upload. Pass sha256, the digest prefix a shared file’s transcript marker records, to require the bytes still match it (409 WORKSPACE_FILE_CHANGED otherwise). 409 WORKSPACE_TRANSFER_UNAVAILABLE when the deployment has no transfer bucket or it cannot take one right now, 409 DAEMON_FEATURE_MISSING when the agent’s daemon predates control-plane-signed transfers, 404 WORKSPACE_NOT_FOUND for a missing file, 400 WORKSPACE_TOO_LARGE over the transfer cap.
授权
bearerAuth 位置: header
路径参数
请求主体
application/json
TypeScript 定义
在 TypeScript 中使用 request body 类型。
响应主体
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/orgs/string/agents/string/workspace/file/transfer" \ -H "Content-Type: application/json" \ -d '{ "path": "string" }'{ "path": "string", "size": 0, "url": "string", "expiresAt": "string", "cached": true}