OpenFolia

List a manual’s versions

GET
/manuals/{id}/history

As a module’s history (GET /modules/{lang}/{id}/history), of the manual’s manifest (manuals/<id>.yaml): the commits on ?ref=’s first-parent line (of the 1,000 newest) after which the manual, as the reader sees it there (by its audience), differs from before, newest first, 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 manifest. A manual outside the reader’s scope at the ref is 404, exactly like a missing one; a manual deleted at the ref keeps its history, its newest version the removal. Reading an older version itself needs what reading its commit needs (GET /manuals/{id}/compare, GET /manuals/{id}?ref=<commit>): so a reader without content.read.draft is listed only the versions released content holds (main’s head, else a release tag holding exactly that manifest), each with the released commit to read it at (meta.readAt); a manual with versions but none released is 404 to them. Restoring one is an edit in a change set (see the README, “Manual 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

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/manuals/operating/history'
Example Response
{  "data": [    {      "type": "ManualVersion",      "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,        "readAt": "string"      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    },    "truncated": true  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}