--- title: Activate silently slug: '2484' canonical_url: https://docs.coveo.com/en/2484/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Activate silently In some circumstances, for example when creating many Sitecore servers, you'll want to silently configure and activate Coveo for Sitecore. This can be done using the [REST API](https://docs.coveo.com/en/2550/) services that Coveo for Sitecore deploys to set the different configurations, instead of doing so via the [**Command Center**](https://docs.coveo.com/en/2540/) activation page. The interactive Swagger UI documentation for these services is available at `\https:///coveo/api/config/docs/index`. ![Swagger UI for Configuration and Activation services | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/swagger-activation-and-configuration-services.png) ## Prerequisites To perform the configuration and activation of Coveo for Sitecore via the REST API services, you need the following: * A running instance of Sitecore with the [Coveo for Sitecore package installed](https://docs.coveo.com/en/3149/), and on which you have [administrator access](https://docs.coveo.com/en/2490/). * A [Coveo organization](https://docs.coveo.com/en/185/). You'll need the `organizationId` which can be retrieved in the URL of your Coveo organization. ![OrganizationId shown in the URL of your Coveo organization | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/39358608.png) If you don't have access to an existing organization, create a trial organization using the Coveo Platform API **Create organization** Swagger UI page for your region: [US](https://platform.cloud.coveo.com/docs?urls.primaryName=Platform#/Organizations/rest_organizations_post) | [CA](https://platform-ca.cloud.coveo.com/docs?urls.primaryName=Platform#/Organizations/rest_organizations_post) | [EU](https://platform-eu.cloud.coveo.com/docs?urls.primaryName=Platform#/Organizations/rest_organizations_post) | [AU](https://platform-au.cloud.coveo.com/docs?urls.primaryName=Platform#/Organizations/rest_organizations_post) > **Important** > > In the **organizationTemplate** field, specify a Coveo for Sitecore-specific template value. > The options are: > > * `SitecoreCloudProEditionTrial` for the Pro edition. > > * `SitecoreCloudTrialEdition` for the Enterprise edition. * Two API keys: ** [`SearchApiKey`](#create-searchapikey) – for search activities. ** [`ApiKey`](#create-apikey) – for general organization configuration activities. -- To create the `SearchApiKey` . Access the Coveo Platform API **Create API key** Swagger UI page for your region: [US](https://platform.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) | [CA](https://platform-ca.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) | [EU](https://platform-eu.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) | [AU](https://platform-au.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) . Authorize the Swagger UI to perform the upcoming request. .. At the top-right of the screen, click **Authorize**. .. Authenticate into the [Coveo Platform](https://docs.coveo.com/en/186/) as an administrator. . In the **Parameters** section of the Swagger UI: * In the **organizationId** field, enter your [`organizationId`](#prerequisites). * In the **apiKeyTemplateId** field, enter `SitecoreCloudSearch`. > **Note** > > Creating the key based on the `SitecoreCloudSearch` template ensures adherence to the principle of minimum privileges and provides future-proofing by transparently applying any changes made to the template privileges to existing API keys. . Copy the following JSON and paste it in the request body: [source,language=json] ``` { "displayName": "SearchApiKey", "enabled": true } ``` . Click **Execute**. . Retrieve the API key `value` from the response body and store it securely. To create the `ApiKey` . Access the Coveo Platform API **Create API key** Swagger UI page for your region: [US](https://platform.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) | [CA](https://platform-ca.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) | [EU](https://platform-eu.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) | [AU](https://platform-au.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_post) . If necessary, authorize the Swagger UI to perform the upcoming request. .. At the top-right of the screen, click **Authorize**. .. Authenticate into the [Coveo Platform](https://docs.coveo.com/en/186/) as an administrator. . In the **Parameters** section of the Swagger UI: * In the **organizationId** field, enter your [`organizationId`](#prerequisites). . In the **apiKeyTemplateId** field, enter `SitecoreCloudConfiguration`. > **Note** > > Creating the key based on the `SitecoreCloudConfiguration` template ensures adherence to the principle of minimum privileges and provides future-proofing by transparently applying any changes made to the template privileges to existing API keys. . Copy the following JSON and paste it in the request body: [source,language=json] ``` { "displayName": "ApiKey", "enabled": true } ``` . Click **Execute**. . Retrieve the API key `value` from the response body and store it securely. > **Important** > > [.version.no-link.c4sc.c4sc-azure.on-Azure] > Sitecore on Azure > > > Azure's Web Application Firewall (WAF) may block Coveo query network requests that trigger OWASP rules. > You might need to disable or customize Azure WAF rules to allow Coveo for Sitecore network requests (see [Azure Web Application Firewall triggered rules block Coveo for Sitecore's communication on Content Delivery servers](https://connect.coveo.com/s/article/2845)). -- ## Configure and activate Coveo for Sitecore This process requires the following steps: * [Retrieve the endpoints](#step-1-retrieve-your-organization-endpoints) needed for configuration. * [Configure Coveo for Sitecore](#step-2-configure) application parameters and connections to the [Coveo Platform](https://docs.coveo.com/en/186/) APIs that Coveo for Sitecore uses. * [Activate Coveo for Sitecore](#step-3-activate). ### Step 1 - Retrieve your organization endpoints The request you'll perform will retrieve the search, admin, and analytics [organization endpoints](https://docs.coveo.com/en/o1ud0002/) you can use in step 2 to [configure](#step-2-configure) Coveo for Sitecore. You need the [October 23, 2023 release (5.0.1277.4)](https://docs.coveo.com/en/n5jd0437/) or later to be able to configure Coveo for Sitecore with organization endpoints. [.float-group.list-float] -- ![Organization endpoints API request | Coveo](c4sc-v5/organization-endpoints-api-call.png) . Access the Coveo Platform API **Get organization global configuration** Swagger UI page for your region: [US](https://platform.cloud.coveo.com/docs?urls.primaryName=Organization#/Organization%20Global%20Configuration/rest_global_organizations_paramId_get) | [CA](https://platform-ca.cloud.coveo.com/docs?urls.primaryName=Organization#/Organization%20Global%20Configuration/rest_global_organizations_paramId_get) | [EU](https://platform-eu.cloud.coveo.com/docs?urls.primaryName=Organization#/Organization%20Global%20Configuration/rest_global_organizations_paramId_get) | [AU](https://platform-au.cloud.coveo.com/docs?urls.primaryName=Organization#/Organization%20Global%20Configuration/rest_global_organizations_paramId_get) . If necessary, authorize the Swagger UI to perform the upcoming request. .. At the top-right of the screen, click **Authorize**. .. Authenticate into the [Coveo Platform](https://docs.coveo.com/en/186/) as an administrator. . Enter your `organizationId` and click **Execute**. . Copy the response body so that you can specify these endpoints in the next step. -- ### Step 2 - Configure In this step, you'll use the REST API bundled in Coveo for Sitecore to configure communication between Sitecore and the [Coveo Platform](https://docs.coveo.com/en/186/), and to set application parameters. For example, you'll tell Coveo for Sitecore which [Coveo organization](https://docs.coveo.com/en/185/) to index your items in, the [Coveo Platform](https://docs.coveo.com/en/186/) API endpoint URLs and keys to use for indexing and search activities. . Open the `\https:///coveo/api/config/docs/index#!/ConfigureInstance/ConfigureInstanceV1_Update` Swagger UI page in your browser. . In the **Value** field, set the JSON body parameter values for the PUT request. You can use the example below as a template, and replace the values with your own. .**Example** ```json { "Organization": { "OrganizationId": "mdteste72n3veh", "ApiKey": "xxe116ab99-6d42-41cc-95tr-7b25bb29ad87", "SearchApiKey": "xx62f4737a-c29p-4f9e-b2x5-6b19012ac8c1", "GeneralPlatformEndpointUrl": "https://platform-ca.cloud.coveo.com", "IndexingEndpointUrl": "https://api-ca.cloud.coveo.com/push", "PlatformEndpointUrl": "https://mdteste72n3veh.admin.org.coveo.com", <1> "SearchEndpointUrl": "https://mdteste72n3veh.org.coveo.com", <2> "UsageAnalyticsEndpointUrl": "https://mdteste72n3veh.analytics.org.coveo.com", <3> "DisableSourceCreation": false <4> }, "SitecoreCredentials": { "Username": "sitecore\admin", <5> "Password": "a46WW!2d" }, "DocumentOptions": { "BodyIndexing": "Rich", <6> "IndexPermissions": true <7> }, "Farm": { "Name": "ABCproduction" <8> }, "Proxy": { "BypassCoveoForSitecoreProxy": false <9> } } ``` <1> Use the `adminDns` value from the response body of the [**Get organization global configuration**](#step-1-retrieve-your-organization-endpoints) request. <2> Use the `distributedDns` value from the response body of the [**Get organization global configuration**](#step-1-retrieve-your-organization-endpoints) request. <3> Use the `analyticsDns` value from the response body of the [**Get organization global configuration**](#step-1-retrieve-your-organization-endpoints) request. <4> The value is optional. `False` is the default value. See [Basic configuration settings](https://docs.coveo.com/en/2562#basic-configuration-settings) for more information on this parameter. <5> Ensure you escape the domain-username backslash in the `Username` field. <6> The value is optional. The default value is `Rich`, which means that the rendered HTML of your Sitecore items will be indexed. <7> The value is optional. The default value is `true`, which means that the permissions on your Sitecore items will be indexed. <8> See the `farmName` property in the [Basic configuration settings](https://docs.coveo.com/en/2562#basic-configuration-settings) table for more information on this parameter. <9> The value is optional. `False` is the default value. See [restEndpointConfiguration section settings](https://docs.coveo.com/en/2568#the-restendpointconfiguration-section-settings) for more information on this parameter. [.float-group.list-float] -- ![Coveo for Sitecore Swagger Configure request](c4sc-v5/swagger-configure-call.png) [start=3] . Specify the administrator's user credentials in the `x-scUsername` and `x-scPassword` headers to authenticate the request. . Click **Try it out**. If the request is successful, you'll get a `204` response with no body. -- ### Step 3 - Activate In this step, you'll use the REST API bundled in Coveo for Sitecore to activate Coveo for Sitecore on the Sitecore instance. This will rename the base `.example` Coveo for Sitecore configuration files to enable them. It will also validate that all values required in the configuration step have been set. [.float-group.list-float] -- ![Coveo for Sitecore Swagger Configure call](c4sc-v5/swagger-activate-call.png) . Open the `\https:///coveo/api/config/docs/index#!/ActivateInstance/ActivateInstanceV1_Post` Swagger UI page in your browser. . Specify the administrator's user credentials in the `x-scUsername` and `x-scPassword` headers to authenticate the request. . Click **Try it out**. If the request is successful, you'll get a `200` response and a response body containing the list of enabled configuration files. --