Used to export bot definition and all associated components. This API only initiates the export process. Use Export Status API to view the progress of the export and also to get a link to download the file once the export is completed.
To use this API, app needs the Admin API Scope of Bot Export under Bot Definition.
POST https://{{host}}/api/public/bot/{{BotID}}/export
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 |
---|---|
exportType | Bot type –
|
exportOptions (optional) | All bot components are exported by default. If needed, you may specify the components to be included in the export.
"exportOptions": { "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}/export \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \ -d '{ "exportType": "published" }'
Sample Response
{ "status": "pending", "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx", "createdBy": "u-xxx-xxx-xxx-xxx-xxxxx", "exportType": "published", "requestType": "Botexport", "_id": "ber-xxxxx-xxx-xxx-xxx-xxxxx", "status": "pending", "createdOn": "2018-12-05T07:18:40.028Z", "__v": 0 }