Umbraco
Umbraco heart

Preview API in Umbraco Heartcore

Preview functionality that makes both developers and editors smile

What is a Preview API?

It’s a bit hard to preview content when you’re decoupled from your frontend, right?  Enter the Preview API...

A Preview API is a crucial feature of a headless CMS which allows you to configure your own Preview mode, and make life much easier for your editors. 

Technically, the Preview API is 1:1 with the Content Delivery API, which means that it can be swapped out whenever something needs to be previewed. 

Both of our client libraries also allow you to switch between the two APIs, so you can use it from within your website, application or whatever else you are building.

 

Who benefits from the Preview API?

In a traditional CMS - where the backoffice and website live together within the same application - you can see your changes on the website before publishing with a click of the Preview button. This is super handy for content editors, who can double-check their changes before they are shipped to the world.

But in the context of a headless CMS, the frontend or presentation layer can be anything from a website to a mobile app, to an app running on a refrigerator, so we need to look at it differently. How do we make sure that content editors can still preview their content? That’s where Preview API comes in.

Now, given that almost everything in a headless context is based around APIs, it makes sense to utilize an API to preview on both websites and apps.

As a developer, you can now utilize the Preview API in Umbraco Heartcore to enable previewing capabilities in what you are building in order to give the content editors the option to Preview their changes before they are published.

What’s so great about it?

It’s flexible

With the Preview API, you get full control over how you want to preview your content:it can be configured as a URL, or as an API; live on or on a staged environment.  Whatever suits you. 

It’s “environment-friendly” 

You can use the Preview API in any environment. Let’s say, for example, you could use the staging environment as a dedicated preview environment for content editors, which are then published when transferred to Live. As developers, you have full creative freedom.

It’s your own coding language

Since the Preview API directly serves content from the backoffice (via endpoints), it can be used in any coding language. Keep using the coding language you’ve been using so far.

It’s simple but important.

It’s important for editors to be able to preview their content before publishing; testing live is risky, and frankly unnecessary.

The Preview API is a crucial part of a headless CMS, so you can rest assured that you have all of the functionality you need to create your innovative headless solutions.

How do I get the Preview API?

The Preview API is automatically included in the Professional plan for Umbraco Heartcore.

See how to set up Preview API in the Preview API documentation and on the blog.