Read a page design template’s text file
One text file of the template’s folder at ?ref= by its path in it (#396), as committed; with workingCopy=true (the change set’s author) the working copy’s text in its place. To change it, save a working copy in a change set (PUT /change-sets/{changeSetId}/page-design-templates/{templateId}/files/working-copy?path=). Every reader of the ref reads it.
bearerAuthorizationBearer <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.
templateId*stringThe template’s folder name (templates/<templateId>/).
^[a-z0-9]+(?:-[a-z0-9]+)*$length <= 100path*stringThe file’s path in the template’s folder. One that is no template text file’s (a name starting with ., a path leaving the folder, an image) is 404.
length <= 1000workingCopy?stringFor 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.
"false""true""false"ref?stringBranch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.
X-Ccms-User?stringDemo 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).
application/vnd.api+json- response
data*id is the file’s path in the template’s folder.
curl -X GET 'http://localhost:3000/page-design-templates/house/file?path=manual.typ'{ "data": { "type": "PageDesignTemplateFileText", "id": "string", "attributes": { "path": "string", "text": "string" } }}