Coveo for Sitecore APIs

The Coveo for Sitecore package includes APIs to configure the solution and perform actions through code. This article describes the service APIs that are available and how to use them.

Coveo for Sitecore Configuration Service API

The Configuration Service API is used to activate and configure your Coveo for Sitecore installation (see Activate silently).

You can access the Swagger UI documentation endpoint of this API at http://<INSTANCE_HOSTNAME>/coveo/api/config/docs/index, where <INSTANCE_HOSTNAME> is replaced with your Sitecore instance name.

Coveo for Sitecore Indexes Service API

The Indexes Service API is used to gather information or perform actions related to fields, indexes, and security identities.

You can access the Swagger UI documentation endpoint of this API at http://<INSTANCE_HOSTNAME>/coveo/api/index/docs/index, where <INSTANCE_HOSTNAME> is replaced with your Sitecore instance name.

Disabling the Swagger UI documentation endpoint

To disable the Swagger UI documentation endpoint

  1. Open the /App_Config/Include/Coveo/Coveo.Service.Api.ConfigService.config file.

  2. Comment out the element below.

    <processor type="Coveo.Service.Api.ConfigService.Processors.InitializeConfigServiceSwagger, Coveo.Service.Api.ConfigService" />

The result should look like this:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Coveo.Service.Api.ConfigService.Processors.InitializeConfigServiceApiRoutes, Coveo.Service.Api.ConfigService" />
        <!-- <processor type="Coveo.Service.Api.ConfigService.Processors.InitializeConfigServiceSwagger, Coveo.Service.Api.ConfigService" /> -->
        <processor type="Coveo.Service.Api.Framework.Processors.InitializeCoveoApiErrorFilter, Coveo.Service.Api.Framework" />
      </initialize>
    </pipelines>
  </sitecore>
</configuration>