{"id":18086,"date":"2018-12-04T13:55:30","date_gmt":"2018-12-04T13:55:30","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?post_type=docs&#038;p=15663"},"modified":"2024-03-11T07:06:06","modified_gmt":"2024-03-11T07:06:06","slug":"bot-export-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/bot-export-api\/","title":{"rendered":"Bot Export API"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"ult-spacer spacer-6ae8707f87891\" data-id=\"6ae8707f87891\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To export the bot definition and all the associated components.<\/p>\n<p><b>Note<\/b>: This API only initiates the export process. Please use the <a href=\"\/docs\/bots\/api-guide\/bot-export-status-api\/\" target=\"_blank\" rel=\"noopener noreferrer\">Export Status API<\/a> to view the export progress status and obtain a link to download the file once the export completes.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Method<\/b><\/td>\n<td>POST<\/td>\n<\/tr>\n<tr>\n<td><b>Endpoint<\/b><\/td>\n<td><span style=\"font-weight: 400;\"><code>https:\/\/{{host}}\/api\/public\/bot\/{{BotID}}\/export<\/code><\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Content Type<\/b><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><b>Authorization<\/b><\/td>\n<td><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" target=\"_blank\" rel=\"noopener noreferrer\">How to generate the JWT Token<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><b>API Scope<\/b><\/td>\n<td>\n<ul>\n<li>Bot Builder: Bot Export<\/li>\n<li>Admin Console: Bot Definition &gt; Bot Export<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8707f87a74\" data-id=\"6ae8707f87a74\" data-height=\"12\" data-height-mobile=\"12\" data-height-tab=\"12\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Query_Parameters\">Query Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<th>Mandate<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>host<\/td>\n<td>The environment URL. For example, <code>https:\/\/bots.kore.ai<\/code><\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td>BotID<\/td>\n<td><span style=\"font-weight: 400;\"><i>Bot ID<\/i> or <i>Stream ID<\/i> can be accessed under <b>General Settings<\/b> on the Bot Builder.<\/span><\/td>\n<td>Required<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8707f87bb2\" data-id=\"6ae8707f87bb2\" data-height=\"12\" data-height-mobile=\"12\" data-height-tab=\"12\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<pre><span style=\"font-weight: 400;\">curl --location 'https:\/\/{host}\/api\/public\/bot\/{BotID}\/export' \\<\/span>\r\n<span style=\"font-weight: 400;\">--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\<\/span>\r\n<span style=\"font-weight: 400;\">--header 'content-type: application\/json' \\<\/span>\r\n<span style=\"font-weight: 400;\">--data '{<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\"exportType\": \"published\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\"exportOptions\": {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"settings\": [<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"botSettings\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"botVariables\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"ivrSettings\"<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0],<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"tasks\": [<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"botTask\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"knowledgeGraph\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"smallTalk\"<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0],<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"nlpData\": [<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"utterances\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"patterns\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"traits\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"rules\",<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0<\/span>  <span style=\"font-weight: 400;\">         \"concepts\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"synonyms\",<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"standardResponses\",<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0<\/span>  <span style=\"font-weight: 400;\">         \"nlpSettings\"<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0]<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0},<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\"subTasks\": {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"alerts\": [],<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"actions\": [],<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"dialogs\": []<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0},<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\"allTasks\": true,<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\"customDashboards\": true,<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\"IncludeDependentTasks\": true<\/span>\r\n<span style=\"font-weight: 400;\">}'<\/span><\/pre>\n<pre><\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8707f87c6b\" data-id=\"6ae8707f87c6b\" data-height=\"12\" data-height-mobile=\"12\" data-height-tab=\"12\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Body_Parameters\">Body Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<th>Mandate<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>exportType<\/td>\n<td>Bot type &#8211;<\/p>\n<ul>\n<li>&#8216;<em>latest<\/em>&#8216; or<\/li>\n<li>&#8216;<em>published<\/em>&#8216;<\/li>\n<\/ul>\n<\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td>exportOptions<\/td>\n<td>All the bot components are exported by default. If required, you may specify the components to be included for the export.<\/p>\n<p>Usage:<\/p>\n<pre>\"exportOptions\": {\r\n      \"tasks\": [\r\n             \"botTask\",\r\n             \"knowledgeGraph\"\r\n           ],\r\n      \"nlpData\": [\r\n             \"nlpSettings\",\r\n             \"utterances\",\r\n             \"standardResponses\"\r\n           ],\r\n      \"settings\": [\r\n             \"botSettings\",\r\n             \"botVariables\",\r\n             \"ivrSettings\"\r\n           ]\r\n   },<\/pre>\n<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td>subTasks<\/td>\n<td>For partial export mention the tasks to be exported.<\/p>\n<p>Usage:<\/p>\n<pre>    \"subTasks\": {\r\n        \"dialogs\": [\"&lt;dialog Name 1&gt;\",\"&lt;dialog Name 2&gt;\"],\r\n        \"alerts\": [\"&lt;alert name 1&gt;\",\"&lt;alert name 2&gt;\"],\r\n        \"actions\": [\"&lt;action name 1&gt;\",\"&lt;action name 2&gt;\"]\r\n    }\r\n<\/pre>\n<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td>IncludeDependentTasks<\/td>\n<td>To include dependent tasks for export.<\/p>\n<p>Usage:<\/p>\n<pre>\"IncludeDependentTasks\": true<\/pre>\n<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td>customDashboards<\/td>\n<td>To include custom dashboards for export.<\/p>\n<p>Usage:<\/p>\n<pre>\"customDashboards\": true<\/pre>\n<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td>allTasks<\/td>\n<td>To include all tasks for export, will be ignored if <em>subTasks<\/em> is present.<\/p>\n<p>Usage:<\/p>\n<pre>\"allTasks\": true<\/pre>\n<\/td>\n<td>Optional<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To learn more about the optional parameters for partial import and dependent tasks, please click <a href=\"\/docs\/bots\/bot-settings\/bot-management\/bot-management-2\/#Exporting_a_Bot\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8707f87ee7\" data-id=\"6ae8707f87ee7\" data-height=\"12\" data-height-mobile=\"12\" data-height-tab=\"12\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<pre>{\r\n    \"status\": \"pending\",\r\n    \"streamId\": \"st-57af1576-bbdc-5ded-a608-5cfbc00c6415\",\r\n    \"createdBy\": \"u-f8708c55-de2c-5690-8821-ac90624779b5\",\r\n    \"exportType\": \"published\",\r\n    \"requestType\": \"Botexport\",\r\n    \"_id\": \"ber-dd746d3c-1631-53af-81ca-03a1d01f0487\",\r\n    \"createdOn\": \"2023-03-31T13:06:16.309Z\",\r\n    \"__v\": 0\r\n}<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"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 auth: {{JWT}} See How to...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-18086","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=18086"}],"version-history":[{"count":27,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18086\/revisions"}],"predecessor-version":[{"id":61445,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18086\/revisions\/61445"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=18086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=18086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=18086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}