Skip to main content
Version: 2.0.0

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. channel_setting_v2

Usage of OpenAPIs

Preparation

  1. 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.

  2. 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

  1. Platform providesMutateChannelUsers API . To call this API, you need the following 2 parameters:
Parameter NameDescriptionsWhere to find
agentIdAgent ID, generated when the agent is createdFront-end URL, or agent settings
channelIdChannel ID, generated when the channel is createdChannel config
  1. Platform providesSearchDocuments API. To call this API, you need the following 4 parameters:
Parameter NameDescriptionsWhere to find
agentIdAgent ID, generated when the agent is createdFront-end URL or agent settings
documentBaseIdDoucument base ID, generated when the document base is createdFront-end URL
channelIdChannel ID, generated when the channel is createdChannel config
environmentSet env type SKETCH or PRODUCTSelect 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 NameDescriptionsWhere to find
agentIdAgent ID, generated when the agent is createdFront-end URL or agent settings
documentBaseIdDoucument base ID, generated when the document base is createdFront-end URL

Import & Export documents via APIs

The platform proviedsImportDocuments APIExportDocuments API. To call this API, you need the following 2 parameters:

Parameter NameDescriptionsWhere to find
agentIdAgent ID, generated when the agent is createdFront-end URL or agent settings
documentBaseIdDoucument base ID, generated when the document base is createdFront-end URL