Access the API
Access the API
Coveo for Sitecore offers APIs to configure the solution or perform actions through code. This article describes which service APIs 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
-
Open the
/App_Config/Include/Coveo/Coveo.Service.Api.ConfigService.config
file. -
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>