OpenFolia

Render a manual as HTML

GET
/manuals/{id}/variants/{variant}/{lang}/html

The resolved manual for one of its published variants as a page: the title, a table of contents and every module, as in the PDF. Read like the PDF and the resolved manual: scope and audience apply, and a manual, variant or language the reader may not have is 404, exactly like a missing one.

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

theme?string

Colour scheme. auto (default) follows the viewer’s prefers-color-scheme; light and dark force one.

Default"auto"
Value in"auto""light""dark"
view?string

reader (default): the HTML readers get. editor: the editor’s preview of it, which also shows each page break as a marker labelled “Page break (PDF)”.

Default"reader"
Value in"reader""editor"
ref?string

Branch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.

Response Body

A complete HTML page (@openfolia/render-html) linking the theme and the renderer’s stylesheet, served with Content-Security-Policy (no script; styles, images and fonts from this origin; frame-ancestors this origin and CCMS_EDITOR_ORIGINS) and X-Content-Type-Options: nosniff. Images are GET /assets/:sha256 and safety symbols GET /symbols/:id (those with artwork; the configured label as the text alternative), at the same ?ref=. Cached like every content route.

response?stringtext/html
Example Request
curl -X GET 'http://localhost:3000/manuals/operating/variants/model=large/en/html'
Example Response
"string"