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" ] }, |
subTasks (optional) |
For partial export mention the tasks to be exported.
"subTasks": { "dialogs": ["<dialog Name 1>","<dialog Name 2>"], "alerts": ["<alert name 1>","<alert name 2>"], "actions": ["<action name 1>","<action name 2>"] } |
IncludeDependentTasks (optional) |
To include dependent tasks for export
"IncludeDependentTasks": |
allTasks (optional) |
To include all tasks for export, will be ignored if subTasks is present
"allTasks": |
For more on the optional parameters for partial import and dependent tasks, see here.
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 \ https://{{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 }