OpenFolia

List a module’s versions

GET
/modules/{lang}/{id}/history

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”).

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

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/en/battery-charging/history'
Example Response
{  "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"  }}