List the downloads
The download centre (#139): every downloadable file of each product at its latest release (the newest that stands, cut from main). One per attachment block of a module for the product (its product facet names the product, or no product), in each language it has a file in, and one per PDF of a manual, variant and language that is rendered (done). A read model over attachments and release outputs: nothing is uploaded here. Filtered before paging, so neither the list nor the total tells of a file outside your scope. Ordered by product, then attachments (by module, language and block order) before manuals (by manual, variant and language). 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).
bearerAuthorizationBearer <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.
filter[product]?stringOnly this product’s files (a value of the product facet).
^[a-z][a-z0-9-]*$length <= 64filter[lang]?stringOnly files in this language.
^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$filter[kind]?stringattachment or manual: only files of this kind.
"attachment""manual"filter[q]?stringOnly files whose name, description, file name, module title or module or manual ID holds every word (case and accents aside).
1 <= length <= 200filter[mediaType]?stringOnly files of this media type (application/pdf), or of a top-level type (image/*).
^[a-z0-9][a-z0-9!#$&^_.+-]{0,62}\/(?:\*|[a-z0-9][a-z0-9!#$&^_.+-]{0,62})$page[number]?integerPage to return, from 1. Default: 1.
1 <= valuepage[size]?integerResources per page. Default: 50, at most 200.
1 <= value <= 200application/vnd.api+json- response
data*array<>meta*links*curl -X GET 'http://localhost:3000/downloads'{ "data": [ { "type": "Download", "id": "string", "attributes": { "kind": "attachment", "product": "string", "lang": "string", "name": "string", "description": "string", "sha256": "string", "size": -9007199254740991, "mediaType": "string", "fileName": "string", "moduleId": "string", "blockId": "string", "manualId": "string", "variant": "string", "release": { "id": "string", "tag": "string", "revision": "string", "publishedAt": "2019-08-24T14:15:22Z" } }, "meta": { "moduleTitle": "string" }, "links": { "versions": "string", "file": "string" } } ], "meta": { "page": { "currentPage": -9007199254740991, "lastPage": -9007199254740991, "perPage": -9007199254740991, "total": -9007199254740991 } }, "links": { "self": "string", "first": "string", "last": "string", "prev": "string", "next": "string" }}