To import the bot definition file to an existing bot for a current version upgrade or previous version restoration.
Note: This API requires the JWT generated by an application created on the Bot Admin Console.
| Method | POST |
| Endpoint | https://{{host}}/api/public/bot/{{BotID}}/import |
| Content Type | application/json |
| Authorization | auth: {{JWT}}
|
| API Scope |
|
Query Parameters
| Parameter | Mandate | Description |
|---|---|---|
| host | Required | The environment URL. For example, https://bots.kore.ai |
| BotID | Required | The Bot ID or Stream ID. You can access it under General Settings on the Bot Builder. |
Sample Request for the Universal Bot
curl -X POST \
https://{{host}}/api/public/bot/{{BotID}}/import \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-H 'content-type: application/json' \
-d '{
"botDefinition" : "5bxxxxxxxxxxxxxxxxxxxxxx",
"configInfo" : "5bxxxxxxxxxxxxxxxxxxxxxx",
"importOptions": {
"nlpData": [
"training_data",
"bot_synonyms",
"nlpSettings",
"defaultDialog",
"standardResponses"
],
"settings": [
"botSettings",
"ivrSettings",
"botVariables",
"ivrSettings",
"genAIandLLMSettings"
],
"options": {
"utterances": {
"append": true,
"replace": false
}
},
"botComponents": [
"linkedBots",
"smallTalk"
],
"customDashboard": true
}
}'
Sample Request
curl -X POST \
https://{{host}}/api/public/bot/{{BotID}}/import \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-H 'content-type: application/json' \
-d '{
"botDefinition" : "5bxxxxxxxxxxxxxxxxxxxxxx",
"configInfo" : "5bxxxxxxxxxxxxxxxxxxxxxx",
"botFunctions":["5bxxxxxxxxxxxxxxxxxxxxxx"]
}'
Body Parameters
| Parameter | Mandate | Description |
|---|---|---|
| botDefinition | Required | “Bot Definition File id” Learn more on obtaining the Definition file ID. |
| configInfo | Required | “Bot Configuration File id” Learn more on obtaining the Configuration file ID. |
| botFunctions | Optional | “Fileid” |
| importOptions | Required | All bot components are imported by default. If needed, you may specify the components to be included in the import.
Usage: "importOptions": {
"tasks": [
"botTask",
"knowledgeGraph"
],
"nlpData": [
"nlpSettings",
"utterances",
"standardResponses"
],
"settings": [
"botSettings",
"botVariables",
"ivrSettings",
"genAIandLLMSettings"
]
},
|
| options | Optional | This will indicate incremental import options for the ML utterances, whether to replace or append. Learn more.
Usage: "options": {
"utterances": {
"replace": true
"append":false
}
|
Sample Response
{
"streamRefId": "c685t327-xxxx-58xx-9xbx-33xxxxxxxxxx",
"statusLogs": [
{
"taskType": "importRequest",
"taskName": "Sample Task",
"status": "success"
}
],
"createdBy": "u-3xxxxxxx-axxe-5bxx-bxxb-8xxxxxxxxxxx",
"requestType": "Botimport",
"_id": "bir-00bxxxxx-7xx2-5xxx-bxxx-79xxxxxxxxxx",
"status": "pending",
"createdOn": "2018-12-05T07:40:51.956Z",
"__v": 0
}