List page builder blocks
const url = 'https://api.example.com/cms/pagebuilder/blocks';const options = {method: 'GET', headers: {'API-Key': '<API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.example.com/cms/pagebuilder/blocks \ --header 'API-Key: <API-Key>'Returns the enabled block types with their settings JSON Schema and their display variants (configured in the CMS). Use it to generate frontend types and to detect variants the frontend does not implement yet; unknown variants should fall back to defaultVariant.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Block definitions
The page builder blocks enabled on this deployment, with their settings and display variants as configured in the CMS (Publisher Configuration → Page Builder). Use it to generate frontend types and to detect variants the frontend does not implement yet.
object
Version of the layout document format
Breakpoints, desktop first
Enabled block types, in the order editors see them
A block type and its display variants
object
Block type, as used in PageLayoutBlock.type
Name shown to editors
Layout kinds the block can be used on
Whether the block holds child blocks (children)
Block types allowed as children of a container
Content sources of list blocks; empty for blocks without data
JSON Schema of the block’s settings
object
Variant key used when a block’s variant is unknown or disabled
Whether an unknown variant falls back to defaultVariant. False for custom: its variants are components, and an unknown one must render nothing.
Enabled display variants, in editor order
A display variant of a block type, configured in the CMS. The key is the contract with frontends and never changes.
object
Variant key, as used in PageLayoutBlock.variant
Name shown to editors
Description shown to editors
Whether this is the block’s default variant
Source kinds this variant supports; null = all
Breakpoints this variant can be used on; null = all
Constraints on block settings for this variant
object
object
JSON Schema of this variant’s options (PageLayoutBlock.variantOptions)
object
Example
{ "schemaVersion": 1, "breakpoints": [ "lg", "md", "xs" ], "blocks": [ { "type": "content_list", "label": "Content list", "kinds": [ "front", "landing", "category_template", "article_template", "author_template", "keyword_template" ], "container": false, "childTypes": [], "sourceKinds": [ "section", "query", "mostread", "mostcommented" ], "settings": { "type": "object", "required": [ "source" ], "properties": { "source": { "type": "object" } } }, "defaultVariant": "thumb_list", "variants": [ { "key": "thumb_list", "label": "Thumbnail list", "description": "Vertical list with a small image beside each headline.", "isDefault": true, "allowedSources": null, "breakpoints": null, "constraints": { "limit": { "min": 1, "max": 20, "default": 5 } }, "options": { "type": "object", "properties": { "showByline": { "title": "Show byline", "type": "boolean" } }, "additionalProperties": false } } ] } ]}Page builder is not enabled