Skip to main content
Download the bytes of a 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, as application/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 a file.

Example

The bytes land in report.pdf; the JSON above is what -D - prints as the X-Response-Body header.

See also