OpenFolia

Read a module

GET
/modules/{lang}/{id}

One module in one language, with the problems found checking it against the project configuration, its status (meta.status: the newest release holding it, main, the open change sets changing it), derived from Git, and where it is used (meta.usedIn, meta.usage: only manuals and modules the reader may see).

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

lang*string
Match^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$
id*string
Match^[a-z0-9]+(?:-[a-z0-9]+)*$
Lengthlength <= 100

Query Parameters

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*

id is <lang>/<moduleId>, as in the URL.

Example Request
curl -X GET 'http://localhost:3000/modules/en/battery-charging'
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        }      ]    }  }}