List a module’s versions
The commits on ?ref=’s first-parent line (of the 1,000 newest) after which the module, as the reader sees it there, differs from before, newest first: a merged change set, or a save point on a change set’s branch. Each with who made it, the change set and the approvers (as the commit’s trailers claim), its revision number counted from the oldest, and the release tags holding exactly that file. A version the reader may not see is no file to them, so it is not listed (one moving the module out of their scope is a removal). A module outside the reader’s scope at the ref is 404, exactly like a missing one; a module deleted at the ref keeps its history, its newest version the removal. Reading an older version itself needs what reading its commit needs (GET /modules/{lang}/{id}/compare, ?ref=<commit>). Restoring one is an edit in a change set (see the README, “Module history”).
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*string^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$id*string^[a-z0-9]+(?:-[a-z0-9]+)*$length <= 100page[number]?integerPage to return, from 1. Default: 1.
1 <= valuepage[size]?integerResources per page. Default: 50, at most 200.
1 <= value <= 200ref?stringBranch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.
application/vnd.api+json- response
data*array<>meta*links*curl -X GET 'http://localhost:3000/modules/en/battery-charging/history'{ "data": [ { "type": "ModuleVersion", "id": "string", "attributes": { "commit": "string", "committedAt": "string", "message": "string", "merge": true, "actor": { "kind": "user", "id": "string" }, "approvedBy": [ { "kind": "user", "id": "string" } ] }, "relationships": { "actor": { "data": { "type": "User", "id": "string" } }, "changeSet": { "data": { "type": "ChangeSet", "id": "string" } }, "approvers": { "data": [ { "type": "User", "id": "string" } ] } }, "meta": { "revision": -9007199254740991, "change": "added", "releases": [ { "tag": "string", "commit": "string" } ], "unreadable": true } } ], "meta": { "page": { "currentPage": -9007199254740991, "lastPage": -9007199254740991, "perPage": -9007199254740991, "total": -9007199254740991 }, "truncated": true }, "links": { "self": "string", "first": "string", "last": "string", "prev": "string", "next": "string" }}