{"id":18062,"date":"2018-08-24T12:15:45","date_gmt":"2018-08-24T12:15:45","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-2\/?post_type=docs&#038;p=15198"},"modified":"2021-03-30T11:13:42","modified_gmt":"2021-03-30T10:13:42","slug":"bot-variables-export","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-2\/docs\/bots\/api-guide\/bot-variables-export\/","title":{"rendered":"Bot Variables 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\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>Exports global and content variables from a bot.<\/p>\n<p class=\"note\">To use this API, app needs the Bot Builder API scope of <em>Export Variables<\/em>.<\/p>\n<p><b>POST <\/b><em><code>https:\/\/{{host}}\/api\/{{version}}\/public\/builder\/stream\/{{BotID}}\/variables\/export<\/code><\/em><\/p>\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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Query_Parameters\">Query Parameters<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>host<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td>BotID<\/td>\n<td>Bot ID. You can access it from the General Settings page of the bot.<\/td>\n<\/tr>\n<\/thead>\n<\/table>\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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Authorization\">Authorization<\/span><\/h3>\n<p>Invoke the API with JWT in the header with the following syntax:<\/p>\n<p><code>auth: {{JWT}}<\/code><\/p>\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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Response_Content_Type\">Response Content Type<\/span><\/h3>\n<p><code>application\/JSON<\/code><\/p>\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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h3>\n<pre>curl -X POST \\\r\n  https:\/\/{{host}}\/api\/1.1\/public\/builder\/stream\/{{BotId}}\/variables\/export \\\r\n  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\<\/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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h3>\n<pre>[\r\n    {\r\n        \"key\": \"Global\",\r\n        \"value\": \"Globalkey-prePopulated\",\r\n        \"hint\": \"\",\r\n        \"variableType\": \"env\",\r\n        \"scope\": \"prePopulated\"\r\n    },\r\n    {\r\n        \"key\": \"Lang\",\r\n        \"variableType\": \"locale\",\r\n        \"scope\": \"prePopulated\",\r\n        \"localeData\": {\r\n            \"en\": {\r\n                \"value\": \"english language prompt\",\r\n                \"hint\": \"\"\r\n            }\r\n        }\r\n    }\r\n]\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":"Exports global and content variables from a bot. To use this API, app needs the Bot Builder API scope of Export Variables. POST https:\/\/{{host}}\/api\/{{version}}\/public\/builder\/stream\/{{BotID}}\/variables\/export Query Parameters Parameter Description host Environment URL, for example, https:\/\/bots.kore.ai BotID Bot ID. You can access it from the General Settings page of the bot. Authorization Invoke the API with JWT...","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-18062","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/18062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/comments?post=18062"}],"version-history":[{"count":5,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/18062\/revisions"}],"predecessor-version":[{"id":22546,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/18062\/revisions\/22546"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/media?parent=18062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/categories?post=18062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/tags?post=18062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}