To export the bot definition and all the associated components.
Note: This API only initiates the export process. Please use the Export Status API to view the export progress status and obtain a link to download the file once the export completes.
| Method | POST |
| Endpoint | https://{{host}}/api/public/bot/{{BotID}}/export |
| Content Type | application/json |
| Authorization |
|
| API Scope |
|
Query Parameters
| Parameter | Description | Mandate |
|---|---|---|
| host | The environment URL. For example, https://bots.kore.ai |
Required |
| BotID | Bot ID or Stream ID can be accessed under General Settings on the Bot Builder. | Required |
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"
}'
Body Parameters
| Parameter | Description | Mandate |
|---|---|---|
| exportType |
Bot type –
|
Required |
| exportOptions |
All the bot components are exported by default. If required, you may specify the components to be included for the export. Usage: "exportOptions": {
"tasks": [
"botTask",
"knowledgeGraph"
],
"nlpData": [
"nlpSettings",
"utterances",
"standardResponses"
],
"settings": [
"botSettings",
"botVariables",
"ivrSettings"
]
},
|
Optional |
| subTasks |
For partial export mention the tasks to be exported. Usage: "subTasks": {
"dialogs": ["<dialog Name 1>","<dialog Name 2>"],
"alerts": ["<alert name 1>","<alert name 2>"],
"actions": ["<action name 1>","<action name 2>"]
}
|
Optional |
| IncludeDependentTasks |
To include dependent tasks for export Usage: "IncludeDependentTasks": |
Optional |
| allTasks |
To include all tasks for export, will be ignored if subTasks is present Usage: "allTasks": |
Optional |
To learn more about the optional parameters for partial import and dependent tasks, please click here.
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
}