Datasets
Search Dataset
Search a dataset for records matching a given search query
post
/v1/dataset/{datasetId}/search
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
datasetIdstring* Required
The ID of the dataset to search
Request Body * Required
Request Body Schema: application/json
searchstring
The keyword/phrase to search for
filterobject
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.dataset.search(
datasetId,{)"search":"string",}"filter":"object"
{"id":"string","records":[{"id":"string","text":"string"}]}
The search was successful