--- title: Manage the Crawling Module using the REST API slug: '3265' canonical_url: https://docs.coveo.com/en/3265/ collection: index-content source_format: adoc --- # Manage the Crawling Module using the REST API Maestro is driven using a REST API and listens on service port 5000 by default, unless you chose a different port while installing Maestro. Check your [Maestro settings](https://docs.coveo.com/en/3264/) to confirm the selected port. Since no UI is available yet to interact with Maestro and manage the Crawling Module, you must use the Maestro Swagger at [`http://localhost:5000/api/swagger/`](http://localhost:5000/api/swagger/). If you decided to use a different service port for Maestro, go to the corresponding address instead (for example, `+http://localhost:5001/api/swagger/+` if you chose to use port 5001). > **Note** > > Coveo only supports Swagger for Crawling Module management. > If you want to use a different tool (for example, PowerShell), keep in mind that the [Coveo Support](https://connect.coveo.com/s/case/Case/Default) team offers help with Swagger only. This article is an overview of the calls you will use to manage the Coveo Crawling Module. Details on each API call are provided under [Crawling Module REST API reference](https://docs.coveo.com/en/3266/). ## Typical Crawling Module use Once [deployed](https://docs.coveo.com/en/3261/), the Crawling Module can retrieve content from [several on-premises sources](https://docs.coveo.com/en/3260#supported-content). You must however ensure you adjust the Crawling Module configuration so that you have [enough workers](https://docs.coveo.com/en/3278/) to crawl your content optimally. . Use the GET `/api/config` call to [view](https://docs.coveo.com/en/3266#getting-the-crawling-module-configuration) your Crawling Module configuration. . Use the PUT `/api/config` call to [edit](https://docs.coveo.com/en/3266#editing-the-crawling-module-configuration) your Crawling Module configuration and your number of workers if needed. . If you also [edit the Maestro settings file (`maestro_settings.ini`)](https://docs.coveo.com/en/3264/), use POST `/api/service/restart` to [restart Maestro](https://docs.coveo.com/en/3266#restarting-maestro) and apply your changes. . [Create a source](https://docs.coveo.com/en/3267/). ## Status and troubleshooting The following calls can be used to troubleshoot your Crawling Module instance. You don't need to make them in the order in which they're presented below. Make those that are relevant to your investigation of the issue. * To [get the status of your workers](https://docs.coveo.com/en/3266#getting-the-workers-status), use GET `/api/status/workers`. Alternatively, see the Crawling Module [component dashboard](https://docs.coveo.com/en/2766/) for a list of your workers, along with their state. * To [get the status of Maestro](https://docs.coveo.com/en/3266#getting-maestros-status), use GET `/api/status/maestro`. * To [get the proxy status](https://docs.coveo.com/en/3266#getting-the-proxy-status), use GET `/api/troubleshooting/proxy/settings`. * To [create a compressed archive containing all available Crawling Module logs](https://docs.coveo.com/en/3266#creating-a-compressed-logs-archive), use POST `/api/logging/logs`. * To [restart Maestro](https://docs.coveo.com/en/3266#restarting-maestro), use POST `/api/service/restart`. * To [get the ID of your Crawling Module instance](https://docs.coveo.com/en/3266#getting-the-crawling-module-id), use GET `/api/config/id`. Contact [Coveo Support](https://connect.coveo.com/s/case/Case/Default) if you encounter issues. ## Updates Crawling Module updates are automatic. This allows you to benefit from the latest features and bug fixes, and prevents the Crawling Module from becoming incompatible with the most recent Coveo update. To stay up to date, the Crawling Module periodically polls Coveo for a new version of Maestro. If an update is available, it will be downloaded and installed within 24 hours, at the [scheduled update time](https://docs.coveo.com/en/3266#editing-the-crawling-module-configuration). The default time is 11:00 PM in the host server's time zone. Disconnecting your server from the Internet or shutting it down will result in the Crawling Module not polling Coveo for updates. Upon the next successful call for an update, if Maestro is two or more versions behind, the workers will stop until it's up to date again. The GET `/api/status/version` allows you to [see which version of Maestro is installed on your server](https://docs.coveo.com/en/3266#getting-the-maestro-version). Alternatively, you can find this information in the [**Crawling Modules**](https://platform.cloud.coveo.com/admin/#/orgid/content/crawling-module/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/crawling-module/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/crawling-module/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/crawling-module/)) [Administration Console](https://docs.coveo.com/en/183/) page, which also shows the latest version available, and on the [component dashboard](https://docs.coveo.com/en/2766/). The POST `/api/update/maestro` call is available in case you ever need to [update Maestro manually](https://docs.coveo.com/en/3266#updating-maestro), for instance if automatic updates fail. You can also contact the [Coveo Support](https://connect.coveo.com/s/case/Case/Default) team for help. ## Password update If you ever need to change the password of your [proxy](https://docs.coveo.com/en/3264#proxy) or [database](https://docs.coveo.com/en/1885/), there's more than one way to do so, depending on whether you can store your password in clear text. ### Storing the password in clear text in the Maestro settings With this method, your password will appear in clear text in the Maestro settings file. Coveo therefore recommends avoiding this method if you're not the only Crawling Module administrator. . [Edit the Maestro settings file](https://docs.coveo.com/en/3264/). . [Use the POST `/api/service/restart` call to restart Maestro](https://docs.coveo.com/en/3266#restarting-maestro). ### Storing the password in the Windows Credential store If you want to avoid storing your password in clear text in the Maestro settings file, you can store it in the Windows Credentials Manager instead. To change your database password, first follow these steps to provide Maestro with the desired new password. Then, change your old database password to the new one. . [Edit the Maestro settings file](https://docs.coveo.com/en/3264/) and set your password to `${credential:key=maestro/}` where `` is an identifier for the password you want to use (for example, `${credential:key=maestro/proxypassword}`). Before you save and close the file, copy this identifier. . Make the `api/config/sensitive` call to provide the `${credential:key=maestro/}` password entry from the previous step. . [Use the POST `/api/service/restart` call to restart Maestro](https://docs.coveo.com/en/3266#restarting-maestro). ## Linking the Crawling Module to an organization Before you [create a source](https://docs.coveo.com/en/3267/), specify in which [Coveo organization](https://docs.coveo.com/en/185/) you want to [index](https://docs.coveo.com/en/204/) your content. Typically, you're prompted to make this decision at the end of the [Crawling Module installation process](https://docs.coveo.com/en/3263/). However, if you have not done so, follow the steps below. You should also follow them to change the organization with which your Crawling Module instance is linked. . [Edit the Maestro settings](https://docs.coveo.com/en/3264/) and then [restart Maestro](https://docs.coveo.com/en/3266#restarting-maestro) if: ** You want the Crawling Module to communicate with Coveo through a proxy ** You want to switch from a regular production organization to a [HIPAA environment](https://docs.coveo.com/en/1853/) or vice versa . Use GET `/api/authorize/url` to [get a URL](https://docs.coveo.com/en/3266#getting-a-url-to-link-the-crawling-module-to-an-organization) at which you will be able to select the organization to link with your Crawling Module instance. . Access this URL and log in to Coveo with an account that has the [privilege](https://docs.coveo.com/en/3151/) to create API keys. . On the **Grant Access** page, click the dropdown menu to select the organization to link with the Crawling Module, and then click **Next**. . Click **Authorize**. . Back on the Crawling Module Swagger page, use the GET `/api/authorize/verify` call to [confirm the success of the linking process](https://docs.coveo.com/en/3266#verifying-the-link-between-the-crawling-module-and-your-organization). . Optionally, [restrict the IP addresses from which the `Crawling modules` API key can be used in requests to Coveo](https://docs.coveo.com/en/3271#restrict-the-api-addresses-from-which-the-crawling-modules-api-key-can-be-used). ## Rotating the Crawling Module API key For security reasons, you should periodically rotate the API key that your Crawling Module instance uses to communicate with your [Coveo organization](https://docs.coveo.com/en/185/). The following procedure describes how you can do so. . On the [**API Keys**](https://platform.cloud.coveo.com/admin/#/orgid/organization/api-access/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/organization/api-access/)) page of the Coveo Administration Console, [create an API key with the **Crawling Module administration** template](https://docs.coveo.com/en/1718#create-a-crawling-module-administration-key). . On the Crawling Module host server, access the POST [`/api/authorize`](http://localhost:5000/api/swagger/index.html?urls.primaryName=Crawling%20Modules%20API%Latest) call Swagger interface. . In the `Token` field, paste the API key you just created. . Click **Execute**. This generates a new `Crawling modules` API key and applies it to your Crawling Module instance. . On the [**API Keys**](https://platform.cloud.coveo.com/admin/#/orgid/organization/api-access/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/organization/api-access/)) page of the Coveo Administration Console, use the search box at the upper right to find the `Crawling modules` API keys. . Disable or delete the old `Crawling modules` API key to prevent its further use. Make sure not to disable or delete the `CM administration key`, nor the new `Crawling modules` API key that was just generated. Refer to the `Created on` column to distinguish between the old and new `Crawling modules` API keys. ## Miscellaneous * When investigating an issue with your Crawling Module instance, the [Coveo Support](https://connect.coveo.com/s/case/Case/Default) team may ask you to provide your dumps. You can then use the POST `/api/logging/dumps/purge` request to [delete your dumps and free up disk space](https://docs.coveo.com/en/3266#deleting-the-dumps-folder-files). * When [creating a Database source](https://docs.coveo.com/en/1885/) to index a database that uses an ODBC driver, use GET `/api/odbc/drivers` to [view a list of the drivers installed on the host server](https://docs.coveo.com/en/3266#getting-the-available-drivers-for-an-odbc-source) that you can specify in the connection string. See [About ODBC drivers](https://docs.coveo.com/en/1885#about-odbc-drivers) for details. * If you ever need to make a copy of your Crawling Module instance, you'll have two instances with the same identifier. To prevent communication issues, use the POST `/api/config/id` request to [generate a new unique identifier](https://docs.coveo.com/en/3266#generating-a-new-crawling-module-id) for one of these instances.