--- title: Crawling Module REST API reference slug: '3266' canonical_url: https://docs.coveo.com/en/3266/ collection: index-content source_format: adoc --- # Crawling Module REST API reference Maestro is driven using a REST API and listens on port 5000 by default. Since not all Crawling Module management operations are available in the [Administration Console](https://docs.coveo.com/en/183/) yet, you must use Swagger at [`http://localhost:5000/api/swagger/`](http://localhost:5000/api/swagger/) to accomplish most of them. If you decided to use a different service port while installing 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 managing Crawling Modules using Swagger. > 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 only offers help with Swagger. ## Authentication ### Getting a URL to link the Crawling Module to an organization The GET `/api/authorize/url` call returns the URL at which you should log in with a Coveo account that has the [privilege](https://docs.coveo.com/en/3151/) to create API keys. As you log in, you perform a handshake with Coveo and create an API key for your Crawling Module instance to use when communicating with the Platform. **Request template** ```http GET http://localhost:5000/api/authorize/url HTTP/1.1 Accept: application/json ``` **200 OK response body** ```json { "https://platform.cloud.coveo.com/oauth/authorize?response_type=token&client_id=CrawlingModule&scope=full&redirect_uri=http://localhost:5000/oauth/receive_token.html" } ``` ### Linking the Crawling Module to an organization The POST [`/api/authorize`](http://localhost:5000/api/swagger/index.html?urls.primaryName=Crawling%20Modules%20API%Latest) call allows you to send an authorization token to complete the process of [linking your Crawling Module instance to a Coveo organization](https://docs.coveo.com/en/3265#linking-the-crawling-module-to-an-organization). Typically, you shouldn't need to use this call unless the linking process fails. Before you use this call, ensure that your [Maestro settings](https://docs.coveo.com/en/3264/) contains the correct `CoveoEnvironment` value. The `CoveoEnvironment` parameter represents the type of organization you want to link to your Crawling Module instance. Possible values are `Production` and `Hipaa`. Should the Crawling Module use a proxy to communicate with Coveo, specify its address and credentials as well. In the request, provide the token you [previously obtained](#getting-a-url-to-link-the-crawling-module-to-an-organization). The body of a successful response is an empty JSON object (`{}`). ### Verifying the link between the Crawling Module and your organization Once you have [linked the Crawling Module to a Coveo organization](#linking-the-crawling-module-to-an-organization), you can use the GET `/api/authorize/verify` call to confirm the success of the linking process. **Request template** ```http GET http://localhost:5000/api/authorize/verify HTTP/1.1 Accept: application/json ``` The body of a successful response is an empty JSON object (`{}`). ## Configuration ### Getting the Crawling Module configuration The GET `/api/config` GET request allows you to review your Coveo Crawling Module configuration. The information it returns is the following: * ID of the Coveo organization linked to the Crawling Module instance (also available on the [component dashboard](https://docs.coveo.com/en/2766/)) * Crawling Module instance name * [Log](https://docs.coveo.com/en/3272/) retention period in days * Time at which the Crawling Module installs its [updates](https://docs.coveo.com/en/3265#updates) * [Number of content workers](https://docs.coveo.com/en/3278/) (also available on the [component dashboard](https://docs.coveo.com/en/2766/)) * [Number of security workers](https://docs.coveo.com/en/3278/) (also available on the [component dashboard](https://docs.coveo.com/en/2766/)) You can use this call to check that your configuration is adequate, and then [edit this configuration](#editing-the-crawling-module-configuration) if needed. **Request template** ```http GET http://localhost:5000/api/config HTTP/1.1 Accept: application/json ``` The body of a successful response contains information regarding the Crawling Module configuration. **200 OK response body** ```json { "OrganizationId": "connectorsteamtestsmf76kcam", "Name": "MyCompanysCrawlingModule", "LogRetentionPeriodInDays": 30, "AutoUpdateTriggerTime": "23:00:00", "NumberOfCrawlerWorkers": 2, "NumberOfSecurityWorkers": 1 } ``` ### Editing the Crawling Module configuration Use the PUT `/api/config` call to provide new values for your Crawling Module configuration parameters. **Request template** ```http PUT http://localhost:5000/api/config HTTP/1.1 Content-Type: application/json-patch+json ``` Include the key-value pairs to modify in the request body. Possible pairs are: * `"Name": ""` * `"LogRetentionPeriodInDays": ` * `"AutoUpdateTriggerTime": "