OpenFolia

Read a page design

GET
/page-designs/{designId}

One page design at ?ref=, with the problems found checking it against the configuration and its assets (logo, fonts, cover images) against the blob store, else the repository’s older layout (assets/<sha256> at that commit). A file that is no design is 422 invalid-content.

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

designId*string
Match^[a-z0-9]+(?:-[a-z0-9]+)*$
Lengthlength <= 100

Query Parameters

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*

id is the design’s ID, its file name (design/<id>.yaml); a manual names it in design, the configuration as pdf.design for every manual naming none.

Example Request
curl -X GET 'http://localhost:3000/page-designs/product-line'
Example Response
{  "data": {    "type": "PageDesign",    "id": "string",    "attributes": {      "schemaVersion": 1,      "name": "string",      "preset": "string",      "template": "string",      "page": {        "size": "a4",        "margins": {          "top": 26,          "right": 22,          "bottom": 24,          "left": 22        },        "doubleSided": false      },      "colours": {        "primary": "string",        "accent": "string",        "text": "string"      },      "fonts": {        "embeddingAllowed": false      },      "logo": {        "light": "string",        "dark": "string"      },      "titlePage": {        "fields": [          "title",          "variant",          "language",          "release",          "date"        ]      },      "regions": {},      "translations": {        "property1": {          "sourceCommit": "string",          "blocks": {            "property1": "string",            "property2": "string"          }        },        "property2": {          "sourceCommit": "string",          "blocks": {            "property1": "string",            "property2": "string"          }        }      },      "coverImage": {        "default": {          "asset": "string",          "alt": "string"        },        "variants": []      },      "backPage": {        "position": "last",        "copyright": "string",        "documentNumber": true,        "date": true      },      "header": {        "default": {          "left": [            {              "type": "placeholder",              "key": "title"            }          ],          "right": [            {              "type": "placeholder",              "key": "variant"            }          ]        }      },      "footer": {        "default": {          "left": [            {              "type": "placeholder",              "key": "language"            }          ],          "right": [            {              "type": "placeholder",              "key": "page"            }          ]        }      },      "headings": {        "numbering": [          "decimal"        ],        "sizes": [          "3xl",          "2xl",          "xl",          "base"        ],        "colour": "text",        "pageBreakBeforeLevel1": true      },      "body": {        "fontSize": 10,        "lineHeight": 1.45,        "paragraphSpacing": 7,        "columns": 1      },      "tables": {        "headerTint": true,        "borders": "horizontal",        "zebra": false      },      "steps": {        "marker": "filled-circle"      },      "notes": {        "style": "tinted"      },      "safety": {        "standard": "ansi-z535"      }    },    "meta": {      "issues": [        {          "severity": "error",          "code": "string",          "message": "string",          "at": "string",          "block": "string"        }      ]    }  }}