HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Installing Content Delivery API

This topic explains how to install the 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 will be used.

Installation procedure

Install the NuGet packages in your solution using the NuGet Package Manager in Visual Studio or via command line:

dotnet add package EPiServer.ContentDeliveryApi.Cms

See the general Installing Optimizely instructions for information about setting up Visual Studio, requirements, and so on.

Installation packages

Optimizely Content Delivery API consists one main NuGet package, EPiServer.ContentDeliveryApi.Cms, and a number of additional NuGet packages, letting you install only the functionality you need. These are the additional packages:

  • EPiServer.ContentDeliveryApi.Cms
    This is the main package that also has a dependency to EPiServer.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 the EPiServer.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 the EPiServer.ContentDeliveryApi.Search package. This package basically 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 the EPiServer.ContentDeliveryApi.CMS package.