Loading...

Last updated: Nov 08 2018

Area: Content Delivery API Applies to versions: 2 and higher
Other versions:

Installing Content Delivery API

In this topic

Deliverabilities

The Content Delivery API contains five NuGet packages:

  • EPiServer.ContentDeliveryApi.Core: Contains base classes, interfaces, and services for data manipulation.
  • EPiServer.ContentDeliveryApi.Cms: Depends on EPiServer.ContentDeliveryApi.Core. The package contains API endpoints to retrieve content created in Episerver CMS. 
  • EPiServer.ContentDeliveryApi.OAuth: This is a standalone package that enables OAuth 2.0 token-based authentication and authorization. 
  • EPiServer.ContentDeliveryApi: This package depends on EPiServer.ContentDeliveryApi.Core, EPiServer.ContentDeliveryApi.Cms, and EPiServer.ContentDeliveryApi.OAuth. 

  • EPiServer.ContentDeliveryApi.Search: Contains API endpoints for data searching with EPiServer.Find. The package depends on EpiServer.Find and EPiServer.ContentDeliveryApi.Core.

Depending on specific scenarios, one or several packages can be installed. For example: 

  • If the Content Delivery API runs on the same domain and in the same server context as the regular site, and the purpose is to use it along with frameworks like React or Vue to build the front-end, the EPiServer.ContentDeliveryApi.Cms package should be installed.
    For this scenario, Content Delivery API can work well with cookie-based authentication (for example, using the default login form of the Alloy site), so there is no need of installing EPiServer.ContentDeliveryApi.OAuth package for token-based authentication and authorization. 

  • If searching functionalities should be enhanced within the site, EPiServer.ContentDeliveryApi.Search package should be installed. This package basically connects the site to Episerver Find through endpoints.

  • If the purpose is to build front-end on mobile platforms, EPiServer.ContentDeliveryApi should be chosen.  The ContentDeliveryApi.OAuth package provides an endpoint to obtain token and later on, this token is used for authentication and authorization for requests acquiring resources. 

Upgrading from version 1.x

Follow these steps to upgrade the Content Delivery API if the site has installed versions 1.0.0 or 1.0.1:

  • If you want to use the default OAuth of the Content Delivery API, upgrade your site to EPiServer.ContentDeliveryApi 2.x.
  • If you do not need the default OAuth, first uninstall the package EPiServer.ContentDeliveryApi 1.x, and then, install the package EPiServer.ContentDeliveryApi.Cms 2.x.
  • If the site previously used EPiServer.ContentDeliveryApi.Search, this package should be re-installed using version 2.x.  

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/