OpenFolia

List the downloads

GET
/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).

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.

Query Parameters

filter[product]?string

Only this product’s files (a value of the product facet).

Match^[a-z][a-z0-9-]*$
Lengthlength <= 64
filter[lang]?string

Only files in this language.

Match^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$
filter[kind]?string

attachment or manual: only files of this kind.

Value in"attachment""manual"
filter[q]?string

Only files whose name, description, file name, module title or module or manual ID holds every word (case and accents aside).

Length1 <= length <= 200
filter[mediaType]?string

Only files of this media type (application/pdf), or of a top-level type (image/*).

Match^[a-z0-9][a-z0-9!#$&^_.+-]{0,62}\/(?:\*|[a-z0-9][a-z0-9!#$&^_.+-]{0,62})$
page[number]?integer

Page to return, from 1. Default: 1.

Range1 <= value
page[size]?integer

Resources per page. Default: 50, at most 200.

Range1 <= value <= 200

Response Body

application/vnd.api+json
  1. response
data*array<>
meta*
links*
Example Request
curl -X GET 'http://localhost:3000/downloads'
Example Response
{  "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"  }}