{"id":29204,"date":"2021-08-24T12:30:07","date_gmt":"2021-08-24T11:30:07","guid":{"rendered":"https:\/\/developer.kore.ai\/v8-1\/?p=29204"},"modified":"2021-08-24T12:32:00","modified_gmt":"2021-08-24T11:32:00","slug":"upload-file-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-1\/docs\/bots\/api-guide\/upload-file-api\/?lang=ja","title":{"rendered":"\u30d5\u30a1\u30a4\u30ebAPI\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9"},"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>botdefinition\u3001botconfig\u3001botfunction\u30d5\u30a1\u30a4\u30eb\uff08\u3042\u308c\u3070\uff09\u3001\u304a\u3088\u3073\u30dc\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u3092\u30ed\u30fc\u30ab\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3001<a href=\"\/?p=18089\" target=\"_blank\" rel=\"noopener noreferrer\">\u30a4\u30f3\u30dd\u30fc\u30c8\u30dc\u30c3\u30c8API<\/a>\u3067\u4f7f\u7528\u3059\u308b\u30d5\u30a1\u30a4\u30ebID\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u3092\u5225\u3005\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<b>POST<\/b> <code>https:\/\/{{host}}\/api\/public\/uploadfile<\/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<h2><span class=\"ez-toc-section\" id=\"i\">\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf<\/span><\/h2>\n<table style=\"height: 41px\" width=\"391\">\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><span style=\"font-weight: 400\">\u30db\u30b9\u30c8<\/span><\/td>\n<td>\u74b0\u5883URL\uff08\u4f8b\uff1a https:\/\/bots.kore.ai\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"i-2\">\u672c\u6587\u30d1\u30e9\u30e1\u30fc\u30bf<\/span><\/h2>\n<p>\u6e21\u3055\u308c\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u3001\u5fc5\u8981\u3068\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30ebID\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"ID\"><span style=\"font-weight: 400\">\u30dc\u30c3\u30c8\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30ebID\u7528<\/span><\/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><span style=\"font-weight: 400\">\u30d5\u30a1\u30a4\u30eb<\/span><\/td>\n<td>Botdefinition.json\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/td>\n<\/tr>\n<tr>\n<td>fileContext<\/td>\n<td>bulkImport<\/td>\n<\/tr>\n<tr>\n<td>fileExtension<\/td>\n<td>json<\/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=\"ID-2\"><span style=\"font-weight: 400\">\u30dc\u30c3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30ebID\u7528<\/span><\/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><span style=\"font-weight: 400\">\u30d5\u30a1\u30a4\u30eb<\/span><\/td>\n<td><span style=\"font-weight: 400\">Botconfig.json\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/span><\/td>\n<\/tr>\n<tr>\n<td>fileContext<\/td>\n<td>bulkImport<\/td>\n<\/tr>\n<tr>\n<td>fileExtension<\/td>\n<td>json<\/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=\"ID-3\"><span style=\"font-weight: 400\">\u30dc\u30c3\u30c8\u306e\u6a5f\u80fd\u30d5\u30a1\u30a4\u30ebID\u7528<\/span><\/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><span style=\"font-weight: 400\">\u30d5\u30a1\u30a4\u30eb<\/span><\/td>\n<td><span style=\"font-weight: 400\">\u30dc\u30c3\u30c8\u306e\u6a5f\u80fd\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/span><\/td>\n<\/tr>\n<tr>\n<td>fileContext<\/td>\n<td>bulkImport<\/td>\n<\/tr>\n<tr>\n<td>fileExtension<\/td>\n<td>js<\/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=\"ID-4\"><span style=\"font-weight: 400\">\u30dc\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u306e\u30d5\u30a1\u30a4\u30ebID\u7528<\/span><\/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><span style=\"font-weight: 400\">\u30d5\u30a1\u30a4\u30eb<\/span><\/td>\n<td><span style=\"font-weight: 400\">\u30dc\u30c3\u30c8\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/span><\/td>\n<\/tr>\n<tr>\n<td>fileContext<\/td>\n<td>bulkImport<\/td>\n<\/tr>\n<tr>\n<td>fileExtension<\/td>\n<td>json<\/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=\"ID-5\"><span style=\"font-weight: 400\">\u6a5f\u68b0\u5b66\u7fd2\u306e\u767a\u8a71\u306e\u30d5\u30a1\u30a4\u30ebID\u7528<\/span><\/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><span style=\"font-weight: 400\">\u30d5\u30a1\u30a4\u30eb<\/span><\/td>\n<td><span style=\"font-weight: 400\">\u6a5f\u68b0\u5b66\u7fd2\u306e\u767a\u8a71\u306e\u30d5\u30a1\u30a4\u30eb\uff08.json or CSV\uff09\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/span><\/td>\n<\/tr>\n<tr>\n<td>fileContext<\/td>\n<td>bulkImport<\/td>\n<\/tr>\n<tr>\n<td>fileExtension<\/td>\n<td><span style=\"font-weight: 400\">json or csv<\/span><\/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<h2><span class=\"ez-toc-section\" id=\"i-3\">\u8a8d\u8a3c<\/span><\/h2>\n<p>\u4ee5\u4e0b\u306e\u69cb\u6587\u3092\u4f7f\u7528\u3057\u3066\u3001JWT\u3092\u30d8\u30c3\u30c0\u30fc\u306b\u542b\u3080API\u3092\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<h2><span class=\"ez-toc-section\" id=\"i-4\">\u5fdc\u7b54\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7<\/span><\/h2>\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<h2><span class=\"ez-toc-section\" id=\"i-5\">\u30b5\u30f3\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8<\/span><\/h2>\n<pre>curl -X POST \\ https:\/\/{{host}}\/api\/public\/uploadfile \\ -H &apos;auth: YOUR_JWT_ACCESS_TOKEN&apos; \\ -H &apos;content-type: multipart\/form-data&apos; \\ -F file=@botDefinition.json \\ -F fileContext=bulkImport \\ -F fileExtension=json<\/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<h2><span class=\"ez-toc-section\" id=\"i-6\">\u30b5\u30f3\u30d7\u30eb\u5fdc\u7b54<\/span><\/h2>\n<pre>{ &quot;fileId&quot;: &quot;5c077d28d28e06c112681656&quot;, &quot;hash&quot;: &quot;c275df72765efb7de332e7d54300cb12de66b78e&quot; }<\/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":"botdefinition\u3001botconfig\u3001botfunction\u30d5\u30a1\u30a4\u30eb\uff08\u3042\u308c\u3070\uff09\u3001\u304a\u3088\u3073\u30dc\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u3092\u30ed\u30fc\u30ab\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u30dc\u30c3\u30c8API\u3067\u4f7f\u7528\u3059\u308b\u30d5\u30a1\u30a4\u30ebID\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u3092\u5225\u3005\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002POST https:\/\/{{host}}\/api\/public\/uploadfile \u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e \u30db\u30b9\u30c8 \u74b0\u5883URL\uff08\u4f8b\uff1a https:\/\/bots.kore.ai\uff09 \u672c\u6587\u30d1\u30e9\u30e1\u30fc\u30bf \u6e21\u3055\u308c\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u3001\u5fc5\u8981\u3068\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30ebID\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002 \u30dc\u30c3\u30c8\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30ebID\u7528 \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e \u30d5\u30a1\u30a4\u30eb Botdefinition.json\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 fileContext bulkImport fileExtension json \u30dc\u30c3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30ebID\u7528 \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e \u30d5\u30a1\u30a4\u30eb Botconfig.json\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 fileContext bulkImport fileExtension json \u30dc\u30c3\u30c8\u306e\u6a5f\u80fd\u30d5\u30a1\u30a4\u30ebID\u7528 \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e \u30d5\u30a1\u30a4\u30eb \u30dc\u30c3\u30c8\u306e\u6a5f\u80fd\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 fileContext bulkImport fileExtension js \u30dc\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u306e\u30d5\u30a1\u30a4\u30ebID\u7528 \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e \u30d5\u30a1\u30a4\u30eb \u30dc\u30c3\u30c8\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 fileContext bulkImport fileExtension json \u6a5f\u68b0\u5b66\u7fd2\u306e\u767a\u8a71\u306e\u30d5\u30a1\u30a4\u30ebID\u7528 \u30d1\u30e9\u30e1\u30fc\u30bf \u8aac\u660e \u30d5\u30a1\u30a4\u30eb \u6a5f\u68b0\u5b66\u7fd2\u306e\u767a\u8a71\u306e\u30d5\u30a1\u30a4\u30eb\uff08.json or CSV\uff09\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 fileContext bulkImport...","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-29204","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/29204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/comments?post=29204"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/29204\/revisions"}],"predecessor-version":[{"id":29205,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/29204\/revisions\/29205"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/media?parent=29204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/categories?post=29204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/tags?post=29204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}