Add or Edit a Source
- Amazon S3 Source
- Box (Personal) Source
- Box Business V2 Source
- Box Business Legacy Source
- Confluence Cloud Source
- Confluence Self-Hosted Source
- Database Source
- Dropbox (Personal) Source
- Dropbox Business Source
- Exchange Enterprise Source
- Exchange Online (Personal) Source
- File System Source
- Generic REST API Source
- Gmail for Work Source
- Gmail (Personal) Source
- Google Drive (Personal) Source
- Google Drive for Work Source
- Jira Software Cloud Source
- Jira Software Self-Hosted Source
- Jive Cloud Source
- Jive Server Source
- Lithium Source
- Microsoft Dynamics 365 Source
- OneDrive for Business Source
- OTCS Source
- Push Source
- RSS Source
- Salesforce Source
- ServiceNow Source
- SharePoint Online Source
- SharePoint Online Legacy Source
- SharePoint Server Source
- Sitecore Source
- Sitemap Source
- Twitter Source
- Web Source
- YouTube Source
- Zendesk Source
Add or Edit a Generic REST API Source
The Coveo Cloud platform has dedicated connectors for many web and on-premises systems, thus allowing you to quickly make application content searchable (see Available Coveo Cloud V2 Connectors). However, there may be applications of which you want to include the content in Coveo Cloud V2, but for which there is no dedicated connector. In such a case, if you have the required privileges, you can use a Generic REST API source to retrieve and make the desired content searchable in Coveo Cloud V2.
A Generic REST API source allows you to crawl content from a remote repository exposing its data through a REST API. When creating your source, you must provide a JSON REST configuration instructing Coveo Cloud V2 to retrieve items from the repository REST services and their respective resource endpoints (see Generic REST API Source Reference, Generic REST API Source JSON Configuration Examples, and Generic REST API Source Tutorial). This configuration indicates which API calls to execute to fetch the desired items, how to parse the responses to extract relevant metadata, and which content type these items represent.
You have valuable content in an on-premises content management system (CMS) developed in-house. One of your developers can create a crawler to get this content and push it to your Coveo Cloud organization.
Source Feature Summary
|Content security options||Secured|
Add or Edit a Generic REST API Source
If not already in the Add/Edit a Generic REST API Source panel, go to the panel:
To add a source, in the main menu, under Content, select Sources > Add Source button > Generic REST API.
To edit a source, in the main menu, under Content, select Sources > source row > Edit in the Action bar.
In the Configuration tab, enter appropriate values for the available parameters:
A descriptive name for your source content. The name must be under 255 characters (not already in use for another source in this organization).
Character optical recognition (OCR)
Check this box if you want Coveo Cloud to extract text from image files and/or PDF files containing images (see Enable Optical Character Recognition). OCR-extracted text is processed as item data, meaning that it is fully searchable and will appear in the item Quick View (see Search Result Quick View).
When adding a source, if you have more than one logical (non-Elasticsearch) index in your organization, select the index in which the retrieved content will be stored (see Leverage Multiple Coveo Indexes). If your organization only has one index, this drop-down menu is not visible and you have no decision to make.
Select who can see items from this source in a search interface that includes this source in its scope (see Content Security):
Private: Only you, when you are authenticated to the search interface with the identity with which you created the source.
In the Authentication section, all parameters are optional. Fill the appropriate boxes depending on the authentication type used by the source you want to make searchable.
If your source uses a HTTP, Basic, Kerberos, or NTLM authentication protocol, enter the Username and Password of the account with which you want to crawl the source. This fills the
passwordfields in your source JSON configuration. The account of which you enter the credentials must have access to all the content that you want to make searchable.
If the repository allows it, it is recommended to use a dedicated crawling account instead of your own account.
If your source uses the OAuth 2.0 authentication protocol, enter your content source Client ID, Client secret and Refresh token in the corresponding boxes.
If your source uses an API key to authenticate, enter it in the API key box.
If your source does not require authentication, leave all boxes empty.
If your sources uses an API key authentication protocol, make sure to include the
@APIkeyplaceholder in the HTTP headers, query parameters, or payload parameters (see Authentication and Generic REST API Source JSON Configuration Examples).
If your source uses the OAuth 2.0 authentication protocol, make sure to include the OAuth 2.0 configuration with the
@RefreshTokenplaceholders (see Authentication and OAuth 2.0).
- In the Access tab, determine whether each group and API key can view or edit the source configuration (see Understanding Resource Access):
- In the Access Level column, select View or Edit for each available group.
- On the left-hand side of the tab, if available, click Groups or API Keys to switch lists.
If you remove the Edit access level from all the groups of which you are a member, you will not be able to edit the source again after saving. Only administrators and members of other groups that have Edit access on this resource will be able to do so. To keep your ability to edit this resource, you must grant the Edit access level to at least one of your groups.
Optionally, consider editing or adding mappings (see Adding and Managing Source Mappings).
You can only manage mapping rules once you build the source (see Add or Edit a Source).
Click Add Source/Save to add/save your source configuration.
If you selected the Create an API key check box:
In the Your Key dialog box that appears, click Copy to copy the API key value to the clipboard, and click OK.
The Your Key dialog box appears only once and is the only place where you can see and copy the key value.
If you fail to copy (or lose) the key value, the workaround is to manually create a new API key by selecting only the View and Edit check boxes for the Sources privileges of the Content service (see Add an API Key). In this case, you should also disable or delete the original unused API key (see Disable/Enable an API Key or Delete an API Key).
An API key is an alphanumeric string that looks like the following:
The key appears in the administration console API Access page and its name is your source name followed by
Paste the API key value with the source name to a safe location of your choice so you can later securely communicate this information to the person who manages the crawling process.
Optionally, review the source refresh schedule.
By default, your Generic REST API source is rescanned daily to make your source content changes searchable (additions, modifications, or deletions) (see Refresh VS Rescan VS Rebuild). If your content changes very frequently, consider decreasing the refresh time interval (such as every hour or every few hours) to optimize resource consumption (see Edit a Source Schedule).
While writing your JSON configuration, you may have decided to populate fields that are not Coveo Cloud V2 default fields. If you have not already created these fields for another source, you must create them in the Fields page before building your source (see Add or Edit Fields and Field Origins).
You decided to retrieve picture URIs and to have Coveo Cloud V2 populate the
pictureurifield with this data. Your item metadata therefore contains:
However, since the
pictureurifield is not a default field like
date, you must create it.
You have another Generic REST API source populating the custom field
facebookaccountid. When creating your new source, you therefore do not need to create this field, as it is already in the Fields page.
Ensure that your source maps correctly all the fields to populate (see Adding and Managing Source Mappings). If a field does not have a mapping, you must create one.
You map the
pictureurifield with the following rule:
In the Sources page, you must click Start initial build or Start required rebuild in the source Status column to add the source content or make your changes effective, respectively.
Once the source is built or rebuilt, you can review its content in the content browser (see Content Browser - Page).
Review the default refresh schedule and adjust it if needed (see Edit a Source Schedule).