OpenFolia

List modules

GET
/modules

The modules the reader may see, ordered by language and ID (or sort), filtered on the module index before paging (the total counts only those), each with its status in meta.status and where it is used in meta.usedIn and meta.usage (only manuals and modules the reader may see). A module file that cannot be read is listed with its error to a reader of everything in its language; a filter on metadata or status leaves it out.

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[lang]?string

Only modules in this language.

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

Only modules of this module type.

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

Only modules that count as this audience level: their own, or the last, most restricted level for a module naming none, as manuals and the access check place it. A level the configuration does not list matches nothing, and a module naming such a level matches no level.

Match^[a-z][a-z0-9-]*$
Lengthlength <= 64
filter[facet]?|array<string>

Only modules with this facet value, as <facet>:<value> (e.g. region:north). Repeat it for several, at most 32: a module has to have every one.

filter[keyword]?|array<string>

Only modules with this keyword, case and diacritics aside (Wärme is warme); 1 to 64 characters, no comma. Repeat it for several, at most 32: a module has to have every one.

filter[product]?string

Only modules with this value of the product facet (release.productFacet in the configuration, else the first facet), as releases name products; none when there is no facet.

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

Only modules that stand so (meta.status): released (the newest release holding the module holds exactly this file), changed (a release holds it, but this file differs), unreleased (none of the 50 newest releases holds it) or in-change-set (an open change set the reader may read changes it; none for a reader who is not told of change sets).

Value in"released""changed""unreleased""in-change-set"
sort?string

Comma-separated fields (id, lang, title, type, usage; usage is the count of manuals and modules using it), each --prefixed for descending, each at most once; ties by language, then ID. A file that cannot be read sorts after the rest by title and type. Default: lang,id.

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
ref?string

Branch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.

Response Body

application/vnd.api+json
  1. response
data*array<|>
meta*
links*
Example Request
curl -X GET 'http://localhost:3000/modules'
Example Response
{  "data": [    {      "type": "Module",      "id": "string",      "attributes": {        "moduleId": "string",        "lang": "string",        "schemaVersion": 1,        "title": "string",        "moduleType": "string",        "audience": "string",        "facets": {},        "keywords": [          "string"        ],        "source": {          "system": "string",          "id": "string"        },        "deprecated": {          "reason": "string",          "replacedBy": "string"        },        "blocks": [          {            "type": "paragraph",            "id": "string",            "content": [              {                "type": "text",                "text": "string",                "marks": [                  {                    "type": "strong"                  }                ]              }            ]          }        ]      },      "meta": {        "issues": [          {            "severity": "error",            "code": "string",            "message": "string",            "at": "string"          }        ],        "status": {          "release": {            "tag": "string",            "commit": "string",            "same": true          },          "main": {            "commit": "string",            "same": true          },          "changeSets": [            {              "id": "string",              "state": "draft"            }          ],          "deprecated": {            "reason": "string",            "replacedBy": "string"          }        },        "usage": {          "manuals": -9007199254740991,          "modules": -9007199254740991        },        "usedIn": [          {            "kind": "manual",            "id": "string",            "title": "string",            "direct": true,            "deprecated": true          }        ]      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}