Stream files into one archive after checking each source against live Share grants. An unshared source matches a missing Item response (#435, DESIGN §26). Return a complete archive to app clients or one offset chunk to bounded agent adapters (#760).
const url = 'https://example.com/api/v1/files/download/zip';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"chunk_size":1,"offset":1,"paths":["example"],"revision":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/files/download/zip \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "chunk_size": 1, "offset": 1, "paths": [ "example" ], "revision": "example" }'Route: /api/v1/files/download/zip. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Fixed ZIP request fields; offset opts into bounded generated-tool chunks (#760).
object
Maximum chunk size, up to 720 KiB. The next call uses offset plus bytes returned.
Byte offset from the start of the deterministic ZIP stream.
Home-relative item paths to include.
Copy the first chunk’s ETag here on every continuation. Restart at zero after a 409.
Examplegenerated
{ "chunk_size": 1, "offset": 1, "paths": [ "example" ], "revision": "example"}Responses
Section titled “Responses”Headers
Section titled “Headers”Copy to revision on ZIP continuation requests
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}