OpenFolia

List what a manual’s PDF layout cannot fit

GET
/manuals/{id}/variants/{variant}/{lang}/pdf/layout-warnings

What the page design’s layout of the PDF GET …/pdf/pages/{page}.png shows (the same reader, ?ref=, ?workingCopy= and ?design=) could not fit: a title or back page region cut off (page-design-overflow) and a running header or footer shortened with an ellipsis (running-head-truncated), once per place, with the first page and how many pages. The PDF is rendered if it is not yet (cached as for its pages). Empty for a manual laid out without a page design.

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
variant*string

Variant slug as listed by GET /manuals/{id}, e.g. model=large.

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

Query Parameters

design?|

For the design screen: lay the manual out with this page design (design/<id>.yaml, read at ref, and its working copy with workingCopy=true) in place of the manual's own; builtin for the built-in design. A design that is not there gives the built-in design, as for a manual naming one. Default: the manual's own (its manifest's design, else pdf.design).

workingCopy?string

For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to GET /change-sets/{changeSetId}/assets/{hash} in an HTML page, and the PDF shows it. Needs ref to name the change set’s branch (change-sets/<id>; else 400 invalid-parameter) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. private, no-cache, without the commit’s ETag. Default: false.

Default"false"
Value in"true""false"
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.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Response Body

application/vnd.api+json
  1. response
data*array<>
meta*
links*
Example Request
curl -X GET 'http://localhost:3000/manuals/operating/variants/model=large/en/pdf/layout-warnings'
Example Response
{  "data": [    {      "type": "LayoutWarning",      "id": "string",      "attributes": {        "code": "page-design-overflow",        "at": "string",        "page": -9007199254740991,        "pages": -9007199254740991,        "text": "string"      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}