Custom Search API
This chapter will introduce: how to use the Custom Search API channel to search for documents.
Channel Config
Click the "Config" button to check the channel ID. Channel ID is used to make API calls.
Usage of OpenAPIs
Preparation
The "OPEN API" section in the toolbar at the top of this documentation contains all the details of the server-side APIs and the engine layer APIs. The server-side APIs support quick calls. For more details, see Guides.
To ensure the security, you need to authenticate the usage of APIs through the service account. For more details, see Service Account.
Create users and replies via APIs
- Platform providesMutateChannelUsers API . To call this API, you need the following 2 parameters:
Parameter Name | Descriptions | Where to find |
---|---|---|
agentId | Agent ID, generated when the agent is created | Front-end URL, or agent settings |
channelId | Channel ID, generated when the channel is created | Channel config |
- Platform providesSearchDocuments API. To call this API, you need the following 4 parameters:
Parameter Name | Descriptions | Where to find |
---|---|---|
agentId | Agent ID, generated when the agent is created | Front-end URL or agent settings |
documentBaseId | Doucument base ID, generated when the document base is created | Front-end URL |
channelId | Channel ID, generated when the channel is created | Channel config |
environment | Set env type SKETCH or PRODUCT | Select based on whether it is a test channel or product channel |
- Non-created user can get search result as well, but will not be counted in the search log.
channelId
field can be set as-
, in which case user can get search result as well, but will not be recorded in the search log.
Tag documents via API
The platform proviedsMutateDocuments API. To call this API, you need the following 2 parameters:
Parameter Name | Descriptions | Where to find |
---|---|---|
agentId | Agent ID, generated when the agent is created | Front-end URL or agent settings |
documentBaseId | Doucument base ID, generated when the document base is created | Front-end URL |
Import & Export documents via APIs
The platform proviedsImportDocuments API、ExportDocuments API. To call this API, you need the following 2 parameters:
Parameter Name | Descriptions | Where to find |
---|---|---|
agentId | Agent ID, generated when the agent is created | Front-end URL or agent settings |
documentBaseId | Doucument base ID, generated when the document base is created | Front-end URL |