Compare two versions of a module
The module at both versions and how it changed, block by block, in the shape of a change set’s changes (meta.change, meta.fields, meta.blocks), so the review screen’s diff renders it. Each side is read as reading its commit needs: a released commit (main’s head, a release tag) with content.read, any other, also an older commit of main, with content.read.draft, else 404 as for a ref that does not exist. Each side shows the module only as the reader would see it on the other too; a side where it is not there is added or removed; 404 when neither has it.
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.
lang*string1 <= length <= 64id*string^[a-z0-9]+(?:-[a-z0-9]+)*$length <= 100base*stringThe older version: a commit ID or a tag.
1 <= length <= 256head*stringThe newer version: a commit ID or a tag.
1 <= length <= 256application/vnd.api+json- response
data*id is <lang>/<moduleId>/<base commit>..<head commit>. Derived from Git, never stored.
curl -X GET 'http://localhost:3000/modules/en/battery-charging/compare?base=string&head=string'{ "data": { "type": "ModuleComparison", "id": "string", "attributes": { "base": { "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" } ] } ] } ] }, "head": { "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": { "base": "string", "head": "string", "change": "added", "fields": [ "string" ], "blocks": [ { "blockId": "string", "change": "added" } ], "unreadable": true } }}