Compose a Publication
| Version | Change |
|---|---|
| release-2021-06 | Initial support for the Composition API in version beta |
| release-2024-03 | Added ignoreComponentConditions and componentConditions query parameters. |
| release-2025-03 | Support in version 2025-03 |
Required scope:
public-api:read
Description
The Composition API loads a Publication with all required information to render a whole document 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: Teasers in
li-document-searchandli-list-referenceare deduplicated across a document, taking into account teasers fromli-document-referenceandli-document-referencesas well. - The only endpoint which is able to resolve includes
Related
Endpoint
POST /api/2025-09/composition/{documentId}Parameters
| Name | Type | Required | 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. Example: | |
| resolveIncludes | boolean | Resolve includes. If true then ‘includes’ will be populated and includes will be resolved in the rendered html. If ‘includes’ is added to the fields array as above, they are resolved in a separate array from the content. | |
| renderOptions.renderDirectiveInfo | boolean | Add attributes with the directive name to directive elements. | |
| ignoreComponentConditions | boolean | Added in: release-2024-03Provides a way to opt out of component filtering and return all content regardless of whether each component passes the conditional checks. Default: | |
| componentConditions | string | Added in: release-2024-03JSON stringified object which contains the component conditions you would like to apply. Default: |
Response
Compose a Publication
With the introduction of the new versioning strategy, thev1andbetaversions are now available as2025-03version. If you use any of those versions, you can safely change your integration to the2025-03version, which now contains both functionalities without any other changes.
| Version | Change |
|---|---|
| release-2021-06 | Initial support for the Composition API in version beta |
| release-2024-03 | Added ignoreComponentConditions and componentConditions query parameters. |
Required scope:
public-api:read
Description
The Composition API loads a Publication with all required information to render a whole document 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: Teasers in
li-document-searchandli-list-referenceare deduplicated across a document, taking into account teasers fromli-document-referenceandli-document-referencesas well. - The only endpoint which is able to resolve includes
Related
Endpoint
POST /api/beta/composition/{documentId}Parameters
| Name | Type | Required | 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. Example: | |
| resolveIncludes | boolean | Resolve includes. If true then ‘includes’ will be populated and includes will be resolved in the rendered html. If ‘includes’ is added to the fields array as above, they are resolved in a separate array from the content. | |
| renderOptions.renderDirectiveInfo | boolean | Add attributes with the directive name to directive elements. | |
| ignoreComponentConditions | boolean | Added in: release-2024-03Provides a way to opt out of component filtering and return all content regardless of whether each component passes the conditional checks. Default: | |
| componentConditions | string | Added in: release-2024-03JSON stringified object which contains the component conditions you would like to apply. Default: |