Compose a Publication
Required scope:
public-api:read
Description
The Composition API
loads a Publication with all required information to render a whole document/page with one request.
Advantages
- Make only one request to get all the required information to render a publication
- High-performing and efficient preloading of references (e.g. lists, includes, other references)
- Useful for a pull architecture
- Deduplication of document teasers
- The only endpoint which is able to resolve includes
Use Cases
- Load a Publication with all required information to render a whole document/page within one request.
Related
Endpoint
POST api/beta/composition/:documentId
Parameters
Name | Type | Notes |
---|---|---|
fields | array<string> | A list of the properties which should be computed and returned. Default: [‘systemdata’, ‘content’, ‘metadata’, ‘includes’, ‘html’, ‘design’] |
metadata.preload | object | You can pass metadata properties which should be resolved. This only works for properties of type ’li-document-reference’, ’li-document-references’, ’li-list-reference’ and ’li-tree’ Example: {metadata: {preload: {myProp: true}}} |
resolveIncludes | boolean | Resolve includes. If true then ‘includes’ will be populated and includes will be resolved in the rendered html |
renderOptions.renderDirectiveInfo | boolean | Add attributes with the directive name to directive elements. |