{"id":39448,"date":"2022-04-01T09:38:27","date_gmt":"2022-04-01T08:38:27","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=39448"},"modified":"2022-04-01T09:38:28","modified_gmt":"2022-04-01T08:38:28","slug":"bot-variables-import-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/bot-variables-import-api\/?lang=ja","title":{"rendered":"Bot Variables Import 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>\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3068\u30b3\u30f3\u30c6\u30f3\u30c4\u5909\u6570\u3092\u30dc\u30c3\u30c8\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p class=\"note\">\u3053\u306eAPI\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30a2\u30d7\u30ea\u306b<em>\u5909\u6570\u306e\u30a4\u30f3\u30dd\u30fc\u30c8<\/em>\u306e\u30dc\u30c3\u30c8\u30d3\u30eb\u30c0\u30fcAPI\u30b9\u30b3\u30fc\u30d7\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>POST<\/strong> <i><code>https:\/\/{{host}}\/api\/{{version}}\/public\/builder\/bot\/{{BotID}}\/variables\/import<\/code><\/i><\/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=\"i\">\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>\u30d1\u30e9\u30e1\u30fc\u30bf<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>host<\/td>\n<td>\u74b0\u5883URL\u3001\u4f8b\uff1a https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td>BotID<\/td>\n<td>\u30dc\u30c3\u30c8ID\u3002\u30dc\u30c3\u30c8\u306e\u300c\u4e00\u822c\u8a2d\u5b9a\u300d\u30da\u30fc\u30b8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\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=\"i-2\">\u672c\u6587\u30d1\u30e9\u30e1\u30fc\u30bf<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>\u30d1\u30e9\u30e1\u30fc\u30bf<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>key<\/td>\n<td>\u5909\u6570\u306e\u540d\u524d<\/td>\n<\/tr>\n<tr>\n<td>value<\/td>\n<td>\u5909\u6570\u306e\u5024<\/td>\n<\/tr>\n<tr>\n<td>hint<\/td>\n<td>\u5909\u6570\u306e\u8aac\u660e<\/td>\n<\/tr>\n<tr>\n<td>variableType<\/td>\n<td>\n<p>\u5909\u6570\u306e\u30bf\u30a4\u30d7\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059<\/p>\n<ul>\n<li>\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3092\u8868\u3059<strong>env<\/strong>\u307e\u305f\u306f<\/li>\n<li>\u30b3\u30f3\u30c6\u30f3\u30c4\u5909\u6570\u306e<strong>\u30ed\u30b1\u30fc\u30eb<\/strong><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>scope<\/td>\n<td>\n<p>\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u306f\u3001\u5909\u6570\u5ba3\u8a00\u6642\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5408\u308f\u305b\u3066\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059<\/p>\n<ul>\n<li>prePopulated<\/li>\n<li>askOnInstall<\/li>\n<li>hidden<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>localeData<\/td>\n<td>\n<p>\u30ed\u30b1\u30fc\u30eb\u30bf\u30a4\u30d7\u306e\u5909\u6570\u306e\u5834\u5408\u3001\u8ffd\u52a0\u306e\u8a00\u8a9e\u30c7\u30fc\u30bf\u306f\u8a00\u8a9e\u3054\u3068\u306b\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>{\r\n      \"en\": {\r\n        \"value\": \"english language prompt\",\r\n        \"hint\": \"\"\r\n      }\r\n    }<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\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=\"i-3\">\u8a8d\u8a3c<\/span><\/h3>\n<p>\u30d8\u30c3\u30c0\u30fc\u5185\u306eJWT\u3092\u542b\u3080API\u3092\u3001\u4ee5\u4e0b\u306e\u69cb\u6587\u3067\u547c\u3073\u51fa\u3057\u307e\u3059\u3002 <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=\"i-4\">\u5fdc\u7b54\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7<\/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=\"i-5\">\u30b5\u30f3\u30d7\u30eb\u306e\u30ea\u30af\u30a8\u30b9\u30c8<\/span><\/h3>\n<pre>curl -X POST \\\r\n  https:\/\/{{host}}\/api\/1.1\/public\/builder\/bot\/{{BotId}}\/variables\/import \\\r\n  -H 'Content-Type: application\/json' \\\r\n  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n  -d '[\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\t{\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]'<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\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=\"i-6\">\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u304c\u6709\u52b9\u306a\u5834\u5408\u306e\u30b5\u30f3\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8<\/span><\/h3>\n<pre>curl -X POST \\\r\n  https:\/\/{{host}}\/api\/1.1\/public\/builder\/bot\/{{BotId}}\/variables\/import \\\r\n--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n--header 'Content-Type: application\/json' \\\r\n--data-raw '{\r\n    \"botVariables\": [\r\n        {\r\n            \"key\": \"CVar\",\r\n            \"value\": \"Cvar1\",\r\n            \"hint\": \"\",\r\n            \"audioTag\": \"\",\r\n            \"variableType\": \"locale\",\r\n            \"scope\": \"prePopulated\",\r\n            \"localeData\": {\r\n                \"en\": {\r\n                    \"value\": \"Cvar1\",\r\n                    \"hint\": \"\",\r\n                    \"audioTag\": \"\"\r\n                }\r\n            },\r\n            \"group\": \"\",\r\n            \"propagateValue\": false,\r\n            \"vNameSpace\": [\r\n                {\r\n                    \"name\": \"default\",\r\n                    \"refId\": \"10e5fcd0-4f9b-5092-b249-3aebeb01c017\"\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"key\": \"GKey1\",\r\n            \"value\": \"GValue1-C\",\r\n            \"hint\": \"GNotes1\",\r\n            \"audioTag\": \"\",\r\n            \"variableType\": \"env\",\r\n            \"scope\": \"prePopulated\",\r\n            \"group\": \"\",\r\n            \"propagateValue\": false,\r\n            \"vNameSpace\": [\r\n                {\r\n                    \"name\": \"default\",\r\n                    \"refId\": \"10e5fcd0-4f9b-5092-b249-3aebeb01c017\"\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"key\": \"GKey2\",\r\n            \"value\": \"Gkey2Stag\",\r\n            \"hint\": \"GNotes2\",\r\n            \"audioTag\": \"\",\r\n            \"variableType\": \"env\",\r\n            \"scope\": \"prePopulated\",\r\n            \"group\": \"\",\r\n            \"propagateValue\": false,\r\n            \"vNameSpace\": [\r\n                {\r\n                    \"name\": \"default\",\r\n                    \"refId\": \"10e5fcd0-4f9b-5092-b249-3aebeb01c017\"\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"key\": \"GKey55\",\r\n            \"value\": \"GKey55-Staging\",\r\n            \"hint\": \"GNotes2\",\r\n            \"audioTag\": \"\",\r\n            \"variableType\": \"env\",\r\n            \"scope\": \"prePopulated\",\r\n            \"propagateValue\": false,\r\n            \"vNameSpace\": [\r\n                {\r\n                    \"name\": \"default\",\r\n                    \"refId\": \"10e5fcd0-4f9b-5092-b249-3aebeb01c017\"\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"key\": \"contentvar\",\r\n            \"value\": \"contvarvalue\",\r\n            \"hint\": \"This is content variable\",\r\n            \"audioTag\": \"\",\r\n            \"variableType\": \"locale\",\r\n            \"scope\": \"prePopulated\",\r\n            \"localeData\": {\r\n                \"en\": {\r\n                    \"value\": \"contvarvalue\",\r\n                    \"hint\": \"This is content variable\",\r\n                    \"audioTag\": \"\"\r\n                }\r\n            },\r\n            \"group\": \"\",\r\n            \"propagateValue\": false,\r\n            \"vNameSpace\": [\r\n                {\r\n                    \"name\": \"default\",\r\n                    \"refId\": \"10e5fcd0-4f9b-5092-b249-3aebeb01c017\"\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"botCollections\": [\r\n        {\r\n            \"name\": \"Default\",\r\n            \"description\": \"Default Collection\",\r\n            \"refId\": \"8e65ff0a-edac-5641-b27d-5614a4e94c0c\"\r\n        },\r\n        {\r\n            \"name\": \"Staging\",\r\n            \"description\": \"Staging Environment\",\r\n            \"refId\": \"0c033a41-3988-52a5-bc1c-02a4a10863b3\"\r\n        }\r\n    ],\r\n    \"botCollectionVariables\": [\r\n        {\r\n            \"key\": \"GKey1\",\r\n            \"value\": \"GValue1-C\",\r\n            \"audioTag\": \"\",\r\n            \"refId\": \"0c033a41-3988-52a5-bc1c-02a4a10863b3\"\r\n        },\r\n        {\r\n            \"key\": \"GKey1\",\r\n            \"value\": \"GValue1-C\",\r\n            \"audioTag\": \"\",\r\n            \"refId\": \"8e65ff0a-edac-5641-b27d-5614a4e94c0c\"\r\n        },\r\n        {\r\n            \"key\": \"GKey2\",\r\n            \"value\": \"Gkey2Stag\",\r\n            \"audioTag\": \"\",\r\n            \"refId\": \"0c033a41-3988-52a5-bc1c-02a4a10863b3\"\r\n        },\r\n        {\r\n            \"key\": \"GKey2\",\r\n            \"value\": \"Gkey2Diff\",\r\n            \"audioTag\": \"\",\r\n            \"refId\": \"8e65ff0a-edac-5641-b27d-5614a4e94c0c\"\r\n        },\r\n        {\r\n            \"key\": \"GKey55\",\r\n            \"value\": \"GKey55-Staging\",\r\n            \"audioTag\": \"\",\r\n            \"refId\": \"0c033a41-3988-52a5-bc1c-02a4a10863b3\"\r\n        },\r\n        {\r\n            \"key\": \"GKey55\",\r\n            \"value\": \"GKey55-Default\",\r\n            \"audioTag\": \"testaudioTag\",\r\n            \"refId\": \"8e65ff0a-edac-5641-b27d-5614a4e94c0c\"\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>\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=\"i-7\">\u30b5\u30f3\u30d7\u30eb\u306e\u30ec\u30b9\u30dd\u30f3\u30b9<\/span><\/h3>\n<pre>{\r\n  \"message\": \"2 Variables imported\/updated successfully.\"\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":"\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3068\u30b3\u30f3\u30c6\u30f3\u30c4\u5909\u6570\u3092\u30dc\u30c3\u30c8\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u3053\u306eAPI\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30a2\u30d7\u30ea\u306b\u5909\u6570\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u306e\u30dc\u30c3\u30c8\u30d3\u30eb\u30c0\u30fcAPI\u30b9\u30b3\u30fc\u30d7\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002 POST https:\/\/{{host}}\/api\/{{version}}\/public\/builder\/bot\/{{BotID}}\/variables\/import \u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e host \u74b0\u5883URL\u3001\u4f8b\uff1a https:\/\/bots.kore.ai BotID \u30dc\u30c3\u30c8ID\u3002\u30dc\u30c3\u30c8\u306e\u300c\u4e00\u822c\u8a2d\u5b9a\u300d\u30da\u30fc\u30b8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 \u672c\u6587\u30d1\u30e9\u30e1\u30fc\u30bf \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e key \u5909\u6570\u306e\u540d\u524d value \u5909\u6570\u306e\u5024 hint \u5909\u6570\u306e\u8aac\u660e variableType \u5909\u6570\u306e\u30bf\u30a4\u30d7\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059 \u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3092\u8868\u3059env\u307e\u305f\u306f \u30b3\u30f3\u30c6\u30f3\u30c4\u5909\u6570\u306e\u30ed\u30b1\u30fc\u30eb scope \u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u306f\u3001\u5909\u6570\u5ba3\u8a00\u6642\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5408\u308f\u305b\u3066\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059 prePopulated askOnInstall hidden localeData \u30ed\u30b1\u30fc\u30eb\u30bf\u30a4\u30d7\u306e\u5909\u6570\u306e\u5834\u5408\u3001\u8ffd\u52a0\u306e\u8a00\u8a9e\u30c7\u30fc\u30bf\u306f\u8a00\u8a9e\u3054\u3068\u306b\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 { \"en\": { \"value\": \"english language prompt\", \"hint\": \"\" } } \u8a8d\u8a3c \u30d8\u30c3\u30c0\u30fc\u5185\u306eJWT\u3092\u542b\u3080API\u3092\u3001\u4ee5\u4e0b\u306e\u69cb\u6587\u3067\u547c\u3073\u51fa\u3057\u307e\u3059\u3002 auth: {{JWT}} \u5fdc\u7b54\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7 application\/JSON \u30b5\u30f3\u30d7\u30eb\u306e\u30ea\u30af\u30a8\u30b9\u30c8 curl -X POST \\ https:\/\/{{host}}\/api\/1.1\/public\/builder\/bot\/{{BotId}}\/variables\/import...","protected":false},"author":22,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-39448","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\/39448","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\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=39448"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/39448\/revisions"}],"predecessor-version":[{"id":39449,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/39448\/revisions\/39449"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=39448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=39448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=39448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}