Install Content Delivery API
Describes how to install the Optimizely Content Delivery API through NuGet packages.
The Optimizely Content Delivery API is installed through a set of NuGet packages, depending on the scenario in which the headless API is used.
Install the NuGet packages in your solution using the NuGet Package Manager in Visual Studio or through command line:
dotnet add package EPiServer.ContentDeliveryApi.Cms
See the general Install Optimizely instructions for information about setting up Visual Studio, requirements, and so on.
Optimizely Content Delivery API consists of one main NuGet package, EPiServer.ContentDeliveryApi.Cms
, and some additional NuGet packages that let you install only the necessary functionality. These are the additional packages:
EPiServer.ContentDeliveryApi.Cms
This is the main package that also has a dependency toEPiServer.ContentDelivery.Core
.EPiServer.OpenIDConnect
Install this package if you need authentication support. See API authentication.EPiServer.ContentDeliveryApi.Search
Install this package if you need search capabilities in the API. Note that search requires an Optimizely Search & Navigation installation and license. If you do not already have a license for Search & Navigation, you can get one at the Optimizely Marketplace. (Licenses for demo purposes are at Optimizely Search & Navigation - Developer Demo Services/).
Scenarios
Depending on specific scenarios, you can install one or more packages. For example:
-
Same domain and frameworks like React
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 (such as React or Vue) to build the front-end, install theEPiServer.ContentDeliveryApi.Cms
package.For this scenario, Content Delivery API can work well with cookie-based authentication (such as using the default login form of the Alloy site), so there is no need to install the
EPiServer.OpenIDConnect
package for token-based authentication and authorization. -
Search capabilities needed
If searching functionalities should be enhanced within the site, install theEPiServer.ContentDeliveryApi.Search
 package. This package connects the site to Optimizely Search & Navigation through endpoints. -
Front-end mobile platforms
If the purpose is to build front-end on mobile platforms, install theEPiServer.ContentDeliveryApi.CMS
package.
Updated 16 days ago