Release Note- 27th October

Dynamic Content- The Fresh API

In this release we've introduced a new API: the Fresh API. This API is designed specifically for the use of static site generators (SSG), such as Next.js, NuxtJS and Gatsby. Static site generators allow you to build your website ahead of time to improve performance.

On this page we'll provide you with a quick overview of the features of the Fresh API. You can find more details on the Fresh API overview page.

Why use the Fresh API

Our next generation Content Delivery API, Content Delivery 2, is optimized for speed and scalability. To ensure that content is delivered to the user in the most efficient way possible, it is cached on our Content Delivery Network (CDN) with a Time to Live (TTL) of 5 minutes. This reduces latency and provides the best experience for the user.

The Fresh API is designed for use within your static site build tools, rather than to deliver content directly to the user. It uses the same format of requests and responses as the Content Delivery 2 API, but the content is not cached.

When using a static site generator with Dynamic Content you will typically trigger a build using our customizable webhooks service, when a content item is published, for example. The Fresh API ensures that when your build is triggered you will always retrieve the uncached, latest version of your content, rather than load the content from the cache.

What's different about the Fresh API

While the Fresh API uses the same format of requests and responses as Content Delivery 2 and the Filter API, there are a few differences in the way that it's used.

  • The Fresh API allows you to retrieve content without a cache.
  • The Fresh API should not be used to deliver content to the end user. It is only intended for use with your build tools.
  • The Fresh API is rate limited. These limits will be discussed with you at the beginning of your project.
  • To use the Fresh API, you must include an API key in the header of each request. This API key wil be provided to you when the API is provisioned on your chosen hubs.
  • You can use the filter API to list, filter and sort content and return uncached content items.
The Fresh API uses the same format of requests and responses to the Content Delivery 2 API, but you must include your API key in the header for each request.
The Fresh API uses the same format of requests and responses to the Content Delivery 2 API, but you must include your API key in the header for each request.

How do I get the Fresh API?

If you want to use the Fresh API then it must be provisioned on your account and enabled on each hub on which you want to use it. Contact your Customer Success Manager for more details.

Fresh API overview