Timeline
Timeline is a feature by Contentful that allows you to create, schedule and preview multiple upcoming versions of the same digital experience.
To use the Timeline Preview feature, you can:
- Install the official contentful.js JavaScript library. Make sure you are on version v11.9.0 or higher.
Assuming the website logic is already updated to read the URL query parameters, all you need to do is pass those values when initializing the Contentful client, for example:
The output client must be used in all subsequent requests to ensure a consistent preview experience.
- If you’re not using the official JavaScript client, you’ll need to configure your requests manually. When timeline preview is enabled, make sure all preview entry and asset requests are directed to the
/timeline/endpoints, and include the appropriatereleaseand/ortimestampquery parameters. See below for details.
Query entries using release ID
Retrieves entries across the timeline, similar to the Entries Collection endpoint. Entries are resolved across the timeline starting from the specified release, falling back to the previous scheduled release or the currently published version.
Query entries using timestamp
Retrieves entries across the timeline, similar to the Entries Collection endpoint. Entries are resolved across the timeline starting from the specified timestamp, falling back to the previous scheduled release or the currently published version.
Fetch an entry using release ID
The equivalent of Entry endpoint for resolving content across the timeline.
Fetch an entry using timestamp
The equivalent of Entry endpoint for resolving content across the timeline.
Query assets using release ID
Retrieves assets across the timeline, similar to the Assets Collection endpoint. Assets are resolved across the timeline starting from the specified release, falling back to the previous scheduled release or the currently published version.
Query assets using timestamp
Retrieves assets across the timeline, similar to the Assets Collection endpoint. Assets are resolved across the timeline starting from the specified timestamp, falling back to the previous scheduled release or the currently published version.
Fetch an asset using release ID
The equivalent of Asset endpoint for resolving content across the timeline.
Fetch an asset using timestamp
The equivalent of Asset endpoint for resolving content across the timeline.