Download the file stored on a content item. This endpoint (the address a program calls) accepts the same token as the rest of the API. That makes it the recommended method when a script or another server downloads files without a browser session.
When to use this endpoint
The ContentMediaUrl field in other content responses points to the site's own file download address. That address also accepts the token in the Authorization or Rest-Api-Key header, as well as a browser session. Use /api/content/{ContentID}/stream instead for token-authenticated downloads. With a missing or expired token it answers 401, where the download address redirects to the login page, and a client that follows redirects saves that page in place of the file.
ContentMediaUrl
/api/content/{ContentID}/stream
Authorization
Bearer YOUR_TOKEN
ContentID
Authorization: Bearer YOUR_TOKEN
https://your-site.com/api/content/4523/stream
A successful request returns the raw binary file content with an HTTP 200 OK status. The Content-Type header follows the file extension (for example, application/pdf, image/png, application/vnd.openxmlformats-officedocument.wordprocessingml.document).
Content-Type
application/pdf
image/png
application/vnd.openxmlformats-officedocument.wordprocessingml.document
HTTP/1.1 200 OK Content-Type: application/pdf [Raw binary file data]
The response body is the file itself, with no JSON wrapper around it. The response has no Content-Disposition header, so it carries no file name. Take the name from the file's ContentTitle. A download through this endpoint does not raise the file's DownloadCount, while a download through the ContentMediaUrl address does.
HTTP 500 with an empty body
While Axero does not enforce hard rate limits by default, we recommend the following best practices to ensure optimal performance:
Axero may implement temporary rate restrictions if excessive API usage affects overall site performance. For high-volume integrations, contact Axero to discuss your requirements.
is requesting access to a wiki that you have locked: https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/111533/rest-api-download-file
Your session has expired. You are being logged out.