Dataset Records

Fetch Dataset Record

Fetch a record from a dataset

get
/v1/dataset/{datasetId}/record/{recordId}/fetch

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

datasetIdstring* Required

The ID of the dataset

recordIdstring* Required

The ID of the record to retrieve

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.dataset.record.fetch(

datasetId, recordId
)
{
"id":"string",
"createdAt":"number",
"updatedAt":"number",
"text":"string",
"source":"string"
}
The dataset was retrieved successfully