About the REST Endpoint Configuration Files

When loading a Coveo Hive search page in a web browser, the page components use the REST Endpoint Proxy to perform queries. As it’s installed on the Sitecore website, the REST Endpoint Proxy can access information from the Sitecore context.

The REST Endpoint Proxy relies on two important modules. The first one is a custom HTTP handler that’s seen as the REST endpoint itself. Its default location in the website is https://<INSTANCE_HOSTNAME>/coveo/rest. The second module is the Search API, which resides in Coveo. The Search API is responsible for querying the search index.

This article presents the REST endpoint configuration settings stored in the Coveo.SearchProvider.Rest.config and the Coveo.SearchProvider.Rest.Custom.config patch file. These settings may be found under the configuration/sitecore/coveo/restEndpointConfiguration element.

Note

The Coveo.SearchProvider.Rest.config file also contains a section for pipeline configurations (see About the REST Endpoint Pipelines).

The restEndpointConfiguration Section Settings

Many of the following settings are automatically set at activation in the Coveo.SearchProvider.Rest.Custom.config patch file, while the others have default values that shouldn’t need to be changed.

Name Description Default value

searchApiUri

The URI to connect to the Coveo Search API (see Validate Routes and Ports). You shouldn’t have to update the value of this setting.

analyticsUri

The URI to connect to the Coveo Usage Analytics API (see Validate Routes and Ports). You shouldn’t have to update the value of this setting.

organizationId

The ID of the Coveo organization that’s being queried. You shouldn’t have to update the value of this setting.

apiKey

The encrypted API key of the Coveo organization that’s being queried. You shouldn’t have to update the value of this setting.

bypassCoveoForSitecoreProxy

Whether to bypass the Coveo for Sitecore proxy for Coveo Hive search and analytics calls (see Performing a Query from a Coveo Hive Search Page Through the Proxy and Performing a query from a Coveo Hive search page directly to the Coveo Platform). You should only change the value of this setting in the Command Center, in the Configuration Manager section.

false

requestTimeout

The timeout period for requests going through the search API proxy.

00:00:30

searchTokenExpiration

Defines the period when the search token is valid.

01:00:00

restEndpointPath

Defines the location of the REST endpoint in the Sitecore website (see About the Architecture of Coveo for Sitecore). You shouldn’t have to update the value of this setting.

See Change the default REST endpoint proxy path for instructions on how to set up a custom Coveo REST endpoint.

/coveo/rest

Compiled Configuration Example

When examining the compiled configuration, the content of several nodes will be a reference to the value of a corresponding <cloudPlatformConfiguration> element, because of settings in Coveo.SearchProvider.Rest.Custom.config overriding the ones in Coveo.SearchProvider.Rest.config.

<restEndpointConfiguration>
  ...
  <searchApiUri ref="coveo/cloudPlatformConfiguration/cloudPlatformUri"/>
  <analyticsUri>https://analytics.cloud.coveo.com</analyticsUri>
  <apiKey ref="coveo/cloudPlatformConfiguration/searchApiKey" patch:source="Coveo.SearchProvider.Rest.Custom.config"/>
  <organizationId ref="coveo/cloudPlatformConfiguration/organizationId" patch:source="Coveo.SearchProvider.Rest.Custom.config"/>
</restEndpointConfiguration>
Important

In pre-November 2021 releases of Coveo for Sitecore, the US East region <analyticsUri> element text node was https://platform.cloud.coveo.com/rest/ua. See Validate Routes and Ports for the list of deployment region endpoints.