render_page

readSince v1.0

Render one page of a publication exactly as it will be published, with a report on what worked.

The difference from preview_rendering is that this goes through the publication: its navigation trees decide which pages exist at all, and its rendering selection decides which template presents each type. So it also answers the question "is this element actually a page of this publication?" — asking for something that isn't in the site map is an error rather than an empty page.

The page can be an element, a branch of a navigation tree (a titled branch is a page in its own right), or the word "homepage". As with preview_rendering, read the diagnostics — a section that found nothing leaves no trace in the rendered text.

Parameters

NameTypeRequiredDefaultDescription
publicationStringThe publication the page belongs to, by ID, slug or name.
pageStringWhich page to render: an element by ID, auto-ID or label; a navigation tree branch by its ID (a titled branch is a page in its own right — get_tree_details gives you branch IDs); or the word 'homepage'. Asking for something that isn't in the publication's site map is an error rather than an empty page.
localeStringRender the page in this language (for example 'de').
formatStringmarkdownHow to return the page: 'markdown' is the readable, diffable version; 'html' is what the viewer shows.

Example Request

{"publication": "service-handbook", "page": "SRV-12", "format": "markdown"}

Example Response

{"content": "# Payment Capture\n\n...", "format": "markdown", "page": {"id": "9f0c...", "label": "Payment Capture", "kind": "node"}, "diagnostics": []}

This content was written collaboratively with AI.