create_publication

mutationSince v1.0

Create a publication — the thing that turns your model into a readable site or a PDF report. A publication decides three things: which navigation trees form the site map, which rendering presents each type of element, and what the homepage says.

Use list_trees and list_renderings first to find the ids you need. The homepage is written the same way a rendering document is, except that it isn't about any one element.

Applied immediately. Publishing it — fixing it to a particular version of the model for readers — is a separate step; see publish_publication.

Parameters

NameTypeRequiredDefaultDescription
show_auto_idsBooleantrueWhether readers see elements' auto-IDs — 'PRC-9: Payment Capture' — everywhere they read: the navigation tree, section indexes, page titles, and what the reading assistant may quote. On by default for a new publication.
slugStringThe publication's path segment in its URL. Keep it short and URL-safe — 'service-handbook'.
descriptionStringOptional note for whoever maintains the publication. Not shown to readers.
homepageStringThe publication's front page, written the same way a rendering document is except that it isn't about any one element. Blocks that reach out across the whole model work here; ones relative to a subject have nothing to start from.
navArray<Object>Which navigation trees form the site map, and so which pages the publication has at all. Use list_trees to find tree ids.
rendering_selectionArray<Object>Which rendering presents each type of element. A type with several renderings — a full page and a short summary, say — is decided here, per publication. Use list_renderings to find rendering ids.
nameStringThe publication's display name.
external_servicesArray<Object>Report services connected to this publication.
folder_idStringFolder to place the new publication in, by ID or name.

Example Request

{"name": "Service Handbook", "slug": "service-handbook", "homepage": "# Service Handbook\n\nEverything we run, and who owns it.", "nav": [{"tree_id": "c017..."}], "rendering_selection": [{"target_type_id": "nt-uuid", "rendering_id": "4e2a..."}]}

Example Response

{"success": true, "operation_count": 1, "versions": [95], "created": [{"kind": "publication", "id": "pb-1", "label": "Service Handbook"}]}

This content was written collaboratively with AI.