Changing the Default Coveo for Sitecore REST Endpoint Proxy Path
Changing the Default Coveo for Sitecore REST Endpoint Proxy Path
By default, the REST endpoint proxy for your Coveo for Sitecore instance is set to http://<YourSitecoreInstance>/coveo/rest
.
To change it, follow these steps:
- Open the
Coveo.SearchProvider.Custom.config
file in a text editor. -
In the
configuration/sitecore
element, look for a<sites>
element. If there’s no<sites>
element, add one.<sitecore> <sites> </sites>
-
In the
<sites>
element, add the<site>
element below:<site name="coveorest" virtualFolder="/coveo/rest" physicalFolder="/coveo/rest" enableTracking="false" database="web" domain="extranet" />
You should now have the following configuration structure:
<sitecore> <sites> <site name="coveorest" virtualFolder="/coveo/rest" physicalFolder="/coveo/rest" enableTracking="false" database="web" domain="extranet" /> </sites>
-
In the new
<site>
element, change the values for both thevirtualFolder
andphysicalFolder
attributes. - Open the
Coveo.SearchProvider.Rest.Custom.config
file in a text editor. -
In the
<restEndpointConfiguration>
element, look for a<restEndpointPath>
element. If there’s no<restEndpointPath>
element, add one as follows:<coveo> <restEndpointConfiguration> <restEndpointPath>/coveo/rest</restEndpointPath>
- Change the text content of the
<RestEndpointPath>
element to match the path of the rest site specified previously.
Changing the REST Endpoint an Existing Search Page Uses
If you’ve changed the location of the rest endpoint, you’ll need to reference the new location everywhere you’ve inserted a Legacy Search UI Framework Coveo Search component or a Coveo Hive UI Framework Coveo Search Resources component.
For Legacy Search UI Framework Pages
- In the Sitecore Content Editor, select your Coveo search component.
- In the presentation tab, select Details.
- Click the Coveo Search sublayout.
- Navigate to Advanced control properties.
- Change the Rest uri endpoint.
For Coveo Hive UI Framework Pages
- Open your search interface in the Sitecore Experience Editor.
- Select your Coveo Search Resources component.
- In the floating toolbar, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.
- Set the value of the
Coveo REST endpoint
field to the new path.
Once you performed all these steps you should be able to access your REST endpoint using the path of your choosing.