file session object, along with its envelope.
POST /revisions/:id/data/query (Command: download_session_file)
This is a binary response: pass
Accept: application/octet-stream and the bytes come back as the
response body, with the JSON envelope serialized into the X-Response-Body header instead of the
body. Access-Control-Expose-Headers names X-Response-Body, so a browser client can read it.Request Body
Response
The bytes themselves, asapplication/octet-stream — there is no presigned URL to follow. The JSON
envelope travels in the X-Response-Body header instead of the body:
Errors
forbidden(403) — the alias does not exist, belongs to another revision, or its bytes are gone; a missing and an inaccessible file are deliberately indistinguishable, matching the platform’s read-access convention for session objects.invalid_file_object— the alias names a session object that exists and is not afile.
Example
report.pdf; the JSON above is what -D - prints as the X-Response-Body header.
See also
- File session object — envelope shape and limits.
- Upload Session File — create or replace the file.

