Used to import bot definition file into an existing bot for upgrading to a new version or restoring to an earlier version.
This API requires JWT generated by an application created only from Bot Admin Console.
To use this API, app needs the Admin API Scope of Bot Import under Bot Definition.
POST https://{{host}}/api/public/bot/{{BotID}}/import
Query Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.kore.ai |
BotID | Bot ID or Stream ID. You can access it from the General Settings page of the bot. |
Body Parameters
Parameter | Description |
---|---|
botDefinition | “Bot Definition File id” (refer here to obtain it) |
configInfo | “Bot Configuration File id” (refer here to obtain it) |
botFunctions (Optional Field) | “Fileid” |
importOptions | All bot components are imported by default. If needed, you may specify the components to be included in the import.
"importOptions": { "tasks": [ "botTask", "knowledgeGraph" ], "nlpData": [ "nlpSettings", "utterances", "standardResponses" ], "settings": [ "botSettings", "botVariables", "ivrSettings" ] }, |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response content type
application/json
Sample Request
curl -X POST \ http://{{host}}/api/public/bot/{{BotID}}/import \ -H 'auth: YOUR_JWT_ACCESS_TOKEN' \ -H 'content-type: application/json' \ -d '{ "botDefinition" : "5b7ed2b87cab5c48ea9794f9", "configInfo" : "5b7ed2d77cab5c48ea9794fa", "botFunctions":["5b7ed33a86a5fc48f4777ea6"] }'
Sample Response
{ "streamRefId": "c685t327-8f93-588b-97bb-3399fa998bca", "statusLogs": [ { "taskType": "importRequest", "taskName": "Sample Task", "status": "success" } ], "createdBy": "u-3ae8bd39-a63e-5b2c-b55b-85864a8202c3", "requestType": "Botimport", "_id": "bir-00b2baf0-7e02-523b-b317-79a372b91fc6", "status": "pending", "createdOn": "2018-12-05T07:40:51.956Z", "__v": 0 }