OpenFolia

Download a file

GET
/downloads/{id}/versions/{releaseId}/file

The download’s file as the release holds it. An attachment: from the blob store, always Content-Disposition: attachment under the block’s file name when it fits the stored type (else the hash), X-Content-Type-Options: nosniff and a sandboxing Content-Security-Policy, as GET /assets/{hash} sends an attached file. A manual’s PDF: exactly as GET /releases/{releaseId}/outputs/{outputId}/file sends it (409 output-not-ready until it is rendered). Cached for good (private, max-age=31536000, immutable, the hash as ETag): a release’s file never changes. Needs content.read. Read as you read released content at each release’s tag: an attachment only in a module you may see there (an attachment in a module above your audience is never listed, counted or served), a manual’s PDF only of a manual one of your roles reads whole there (its audience and language, with no module type or facet left out, as for the release’s outputs).

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Path Parameters

id*string

The download’s ID, as GET /downloads gives it (attachment:<product>:<module>:<block>:<lang>, manual:<product>:<manual>:<lang>:<variant>). One that names no download you may read, malformed or not, is 404.

Length1 <= length <= 1400
releaseId*string

A release of the download’s product (a UUID), e.g. a version’s ID. One that names no such release, malformed or not, is 404.

Formatuuid

Response Body

The file, with its stored type.

response?unknown
Example Request
curl -X GET 'http://localhost:3000/downloads/string/versions/497f6eca-6276-4993-bfeb-53cbbbba6f08/file'
Example Response
null