{"id":1305,"date":"2019-10-30T09:26:25","date_gmt":"2019-10-30T00:26:25","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=1305"},"modified":"2019-10-30T09:26:25","modified_gmt":"2019-10-30T00:26:25","slug":"post-1305","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2019\/10\/30\/post-1305\/","title":{"rendered":"\u697d\u5929\u5e02\u5834\u306eAPI\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u4fe1\u3058\u308b\u306a\uff01\u753b\u50cf\u66f4\u65b0API\u3067\u30c9\u306f\u307e\u308a\u3057\u305f\u4e8b\u3002"},"content":{"rendered":"<h2>\u697d\u5929\u5e02\u5834\u306eAPI\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u4fe1\u3058\u308b\u306a\uff01<\/h2>\n<p>\u81ea\u4f5c\u30b7\u30b9\u30c6\u30e0\u3082\u9806\u8abf\u306b\u7d44\u307f\u3042\u304c\u308a\u3001\u73fe\u5728\u904b\u7528\u30c6\u30b9\u30c8\u4e2d\u3067\u3059\u3002<br \/>\n\u30de\u30cb\u30e5\u30a2\u30eb\u3082\u66f8\u304b\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u3067\u307e\u3060\u307e\u3060\u3084\u308b\u4e8b\u6ca2\u5c71\u3042\u308a\u307e\u3059\u304c\u3001\u81ea\u793e\u30c6\u30b9\u30c8\u3067\u306f\u30e4\u30d0\u3044\u304f\u3089\u3044\u5feb\u9069\u306b\u5546\u54c1\u60c5\u5831\u306e\u66f4\u65b0\u304c\u51fa\u6765\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u753b\u50cf\u3082\u4e00\u7dd2\u306b\u66f4\u65b0\u3059\u308b\u4ed5\u7d44\u307f\u306a\u306e\u3067\u3001\u60c5\u5831\u3092\u6574\u7406\u3057\u3066API\u51fa\u54c1\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3060\u3051\u3067\u3059\u3079\u3066\u306e\u51fa\u54c1\u304c\u51fa\u6765\u308b\u5feb\u9069\u3055\u304c\u3001\u65e7\u4f5c\u306eAccess\u306a\u3069\u306b\u306f\u306a\u3044\u5229\u4fbf\u6027\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u307e\u3041\u3001\u5ba3\u4f1d\u306f\u3053\u308c\u304f\u3089\u3044\u306b\u3057\u3066\u3010\u697d\u5929\u5e02\u5834\u306eAPI\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u4fe1\u3058\u308b\u306a\u3011\u306e\u672c\u984c\u306b\u79fb\u308d\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u305a\u3063\u3068\u624b\u3053\u305a\u3063\u3066\u3044\u305f\u30d1\u30fc\u30c4\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u305d\u308c\u306f\u3001\u753b\u50cf\u306eUPDATE\u3068INSERT\uff01<br \/>\nfile_get_contents \u3067\u4f5c\u6210\u3057\u3066\u66f4\u65b0\u3059\u308b\u4e8b\u306f\u51fa\u6765\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3010curl\u3011\u3067\u66f8\u304d\u305f\u3044\u306a\u3041\u3068\u8272\u3005\u5f04\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u9593\u9055\u3044\u306b\u6c17\u3065\u3044\u305f\u306e\u306f\u305d\u306e\u6642\u3067\u3059\u3002<\/p>\n<h3>\u5d4c\u3063\u305f\u753b\u50cf\u306eAPI\u66f4\u65b0<\/h3>\n<p>\u697d\u5929\u5e02\u5834\u306e\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">POST \/public\/1.0\/cabinet\/file\/insert HTTP\/1.1\r\nHost: 127.0.0.1:8011\r\nProxy-Connection: keep-alive\r\nContent-Length: 999999 --\u30b5\u30a4\u30ba\r\nUser-Agent: Mozilla\/5.0 (Windows NT 6.1; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36\r\nOrigin: chrome-extension:\/\/hgmloofddffdnphfgcellkdfbfbjeloo\r\nContent-Type: multipart\/form-data; boundary=\"\u3010boundary\u306e\u6587\u5b57\u5217\u3011\"\r\nAccept: \/\r\nAccept-Encoding: gzip,deflate\r\nAccept-Language: ja,en-US;q=0.8,en;q=0.6\r\n\r\n ------\u3010boundary\u306e\u6587\u5b57\u5217\u3011\r\nContent-Disposition: form-data; name=\"xml\"\r\n \r\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;request&gt;\r\n    &lt;fileInsertRequest&gt;\r\n        &lt;file&gt;\r\n            &lt;fileName&gt;ZZZ&lt;\/fileName&gt;\r\n            &lt;folderId&gt;0&lt;\/folderId&gt;\r\n            &lt;filePath&gt;img136281.jpg&lt;\/filePath&gt;\r\n            &lt;overWrite&gt;true&lt;\/overWrite&gt;\r\n        &lt;\/file&gt;\r\n    &lt;\/fileInsertRequest&gt;\r\n&lt;\/request&gt;\r\n\r\n------\u3010boundary\u306e\u6587\u5b57\u5217\u3011\r\nContent-Disposition: form-data; name=\"file\"; filename=\"Chrysanthemum.jpg\"\r\nContent-Type: image\/jpeg\r\n \r\n[\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf]\r\n------\u3010boundary\u306e\u6587\u5b57\u5217\u3011--<\/pre>\n<p>\u3053\u306e\u59ff\u306b\u5f62\u6210\u3057\u3066\u753b\u50cf\u306eINSERT\u3092\u8a66\u307f\u308b\u306e\u3067\u3059\u304c\u3001\u30a8\u30e9\u30fc\u3002<\/p>\n<p>\u8fd4\u3063\u3066\u304f\u308b\u306e\u306f\u3053\u3093\u306a\u306e\u3070\u304b\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n  &lt;result&gt;\r\n    &lt;status&gt;\r\n      &lt;interfaceId&gt;cabinet.file.insert&lt;\/interfaceId&gt;\r\n      &lt;systemStatus&gt;NG&lt;\/systemStatus&gt;\r\n      &lt;message&gt;SystemError(101)&lt;\/message&gt;\r\n      &lt;requestId&gt;00b38eb4-73f8-4281-be38-f0daf1b7bd30&lt;\/requestId&gt;\r\n      &lt;requests\/&gt;\r\n    &lt;\/status&gt;\r\n  &lt;\/result&gt;<\/pre>\n<pre class=\"lang:default decode:true\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;result&gt;\r\n  &lt;status&gt;\r\n    &lt;interfaceId&gt;cabinet.file.insert&lt;\/interfaceId&gt;\r\n    &lt;systemStatus&gt;NG&lt;\/systemStatus&gt;\r\n    &lt;message&gt;Request data is wrong format&lt;\/message&gt;\r\n    &lt;requestId&gt;5509b199-4eab-4f7c-ad84-75ed31b672bf&lt;\/requestId&gt;\r\n    &lt;requests\/&gt;\r\n  &lt;\/status&gt;\r\n&lt;\/result&gt;<\/pre>\n<h3>multipart\/form-data\u3063\u3066<\/h3>\n<p>\u305d\u3082\u305d\u3082\u30de\u30eb\u30c1\u30d1\u30fc\u30c8\u3092\u5f62\u6210\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3044\u3046\u306e\u306f\u4eca\u307e\u3067\u7d4c\u9a13\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u753b\u50cf\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3068\u304b\u30de\u30eb\u30c1\u30d1\u30fc\u30c8\u3067\u66f4\u65b0\u3055\u308c\u307e\u3059\u304c\u3001Laravel\u3068\u304b\u304c\u52dd\u624b\u306b\u3084\u3063\u3066\u304f\u308c\u308b\u3082\u306e\u306a\u306e\u3067\u3001\u610f\u8b58\u306f\u3057\u3066\u3044\u306a\u3044\u3093\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u3068\u8a00\u3046\u4e8b\u3067\u3001\u6539\u3081\u3066\u52c9\u5f37\u3057\u76f4\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<div class=\"borderBox\">\n<p>\u3010boundary\u306e\u6587\u5b57\u5217\u3011\u3092\u6307\u5b9a\u3057\u3066\u3001\u3010boundary\u306e\u6587\u5b57\u5217\u3011\u306b\u3088\u3063\u3066\u30c7\u30fc\u30bf\u3092\u533a\u5206\u3051\u3057\u3066\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3002<\/p>\n<\/div>\n<p>\u3056\u3063\u304f\u308a\u307e\u3068\u3081\u308b\u3068\u30b3\u30ec\u304c\u30de\u30eb\u30c1\u30d1\u30fc\u30c8\u5f62\u5f0f\u3067\u3059\u3002<br \/>\n\u305d\u3046\u3044\u3063\u305f\u610f\u5473\u3067\u306f\u3001\u4e0a\u306e\u30de\u30cb\u30e5\u30a2\u30eb\u306f\u9593\u9055\u3048\u3066\u3044\u308b\u3088\u3046\u306b\u306f\u898b\u3048\u307e\u305b\u3093\u3002<\/p>\n<p>\u307e\u3041\u30de\u30cb\u30e5\u30a2\u30eb\u3067\u3059\u3057\u306d\u3002\u5927\u9593\u9055\u3044\u306f\u306a\u3044\u3067\u3059\u3088\u306d\u3002<br \/>\n\u3067\u306f\u306a\u305c\u540c\u3058\u5f62\u3092\u4f5c\u3063\u3066\u3082\u66f4\u65b0\u306b\u5931\u6557\u3059\u308b\u304b\u3002\u305d\u308c\u306f\u30de\u30eb\u30c1\u30d1\u30fc\u30c8\u5f62\u5f0f\u306e\u5f93\u308f\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u3044\u30eb\u30fc\u30eb\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30de\u30eb\u30c1\u30d1\u30fc\u30c8\u5f62\u5f0f\u306e\u30eb\u30fc\u30eb<\/h3>\n<div class=\"borderBox\">\n<ol>\n<li>Content-Type\u306e\u5883\u754c\u7dda\u306f \u3010--\u3011\u3067\u6307\u793a\u3092\u3059\u308b\u3002<\/li>\n<li>Content-Type\u306e\u5883\u754c\u7dda\u7d42\u4e86\u306f \u3010--\u3011\u3067\u6307\u793a\u3092\u3059\u308b\u3002<\/li>\n<\/ol>\n<\/div>\n<p>\u3064\u307e\u308a\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u5f62\u6210\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">POST \/public\/1.0\/cabinet\/file\/insert HTTP\/1.1\r\nHost: 127.0.0.1:8011\r\nProxy-Connection: keep-alive\r\nContent-Length: 999999 --\u30b5\u30a4\u30ba\r\nUser-Agent: Mozilla\/5.0 (Windows NT 6.1; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36\r\nOrigin: chrome-extension:\/\/hgmloofddffdnphfgcellkdfbfbjeloo\r\nContent-Type: multipart\/form-data; boundary=\"\u3010boundary\u306e\u6587\u5b57\u5217\u3011\"\r\nAccept: \/\r\nAccept-Encoding: gzip,deflate\r\nAccept-Language: ja,en-US;q=0.8,en;q=0.6\r\n\r\n--\u3010boundary\u306e\u6587\u5b57\u5217\u3011\r\nContent-Disposition: form-data; name=\"xml\"\r\n \r\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;request&gt;\r\n    &lt;fileInsertRequest&gt;\r\n        &lt;file&gt;\r\n            &lt;fileName&gt;ZZZ&lt;\/fileName&gt;\r\n            &lt;folderId&gt;0&lt;\/folderId&gt;\r\n            &lt;filePath&gt;img136281.jpg&lt;\/filePath&gt;\r\n            &lt;overWrite&gt;true&lt;\/overWrite&gt;\r\n        &lt;\/file&gt;\r\n    &lt;\/fileInsertRequest&gt;\r\n&lt;\/request&gt;\r\n\r\n--\u3010boundary\u306e\u6587\u5b57\u5217\u3011\r\nContent-Disposition: form-data; name=\"file\"; filename=\"Chrysanthemum.jpg\"\r\nContent-Type: image\/jpeg\r\n \r\n[\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf]\r\n--\u3010boundary\u306e\u6587\u5b57\u5217\u3011--<\/pre>\n<p>------\u3010boundary\u306e\u6587\u5b57\u5217\u3011\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u5f62\u3092\u6b63\u78ba\u306b\u8868\u8a18\u3059\u308b\u3068\u6b21\u306e\u69d8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"borderBox\">--\u3010----boundary\u306e\u6587\u5b57\u5217\u3011<\/div>\n<p>\u30cf\u30a4\u30db\u30f32\u3064\u304c\u98db\u3073\u51fa\u305f\u3082\u306e\u304c\u30d0\u30a6\u30f3\u30c0\u30ea\u6587\u5b57\u5217\u306b\u306a\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<h3>\u697d\u5929\u5e02\u5834\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u9593\u9055\u3044<\/h3>\n<p>1. \u8aa4\u8a8d\u8868\u8a18\u3092\u8a98\u767a\u3059\u308b\u30d0\u30a6\u30f3\u30c0\u30ea\u6587\u5b57\u5217\u306e\u8868\u8a18\u65b9\u6cd5<\/p>\n<div class=\"borderBox\">\u00d7 Content-Type: multipart\/form-data; boundary=\"\u3010boundary\u306e\u6587\u5b57\u5217\u3011\"<br \/>\n\u25cb Content-Type: multipart\/form-data; boundary=\"\u3010----boundary\u306e\u6587\u5b57\u5217\u3011\"<\/div>\n<p>2. \u306a\u305c\u304b\u7121\u7528\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5165\u3063\u3066\u3044\u308b\u533a\u5207\u308a\u306e\u30b9\u30bf\u30fc\u30c8<\/p>\n<div class=\"borderBox\">\u00d7\u00a0 ------\u3010boundary\u306e\u6587\u5b57\u5217\u3011<br \/>\n\u25cb ------\u3010boundary\u306e\u6587\u5b57\u5217\u3011<\/div>\n<p>\u3044\u3084\u3041\uff5e\u3001\u305d\u308a\u3083\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u5f62\u3092\u305d\u3063\u304f\u308a\u5f62\u6210\u3057\u3066\u3082\u66f4\u65b0\u5931\u6557\u3059\u308b\u308f\u3051\u3067\u3059\u3088\u3002<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u6b63\u89e3\u306f\u6b21\u306e2\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">\u6b63\u89e3\u306f\u6b21\u306e2\u30d1\u30bf\u30fc\u30f3\u3060\u3063\u305f\u307f\u305f\u3044\u3067\u3059\u3002\r\nContent-Type: multipart\/form-data; boundary=\"----\u3010boundary\u306e\u6587\u5b57\u5217\u3011\"\r\n------\u3010boundary\u306e\u6587\u5b57\u5217\u3011\r\n\r\nContent-Type: multipart\/form-data; boundary=\"\u3010boundary\u306e\u6587\u5b57\u5217\u3011\"\r\n--\u3010boundary\u306e\u6587\u5b57\u5217\u3011<\/pre>\n<p>\u3053\u3053\u3060\u3051\u6291\u3048\u3066\u7f6e\u3051\u3070\u30de\u30eb\u30c1\u30d1\u30fc\u30c8\u306f\u305d\u308c\u307b\u3069\u96e3\u3057\u3044\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u308c\u306b\u3057\u3066\u3082\u3001\u30de\u30cb\u30e5\u30a2\u30eb\u304c\u4fe1\u7528\u3067\u304d\u306a\u3044\u3068\u306f...\u30b7\u30e7\u30c3\u30af\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u697d\u5929\u5e02\u5834\u306eAPI\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u4fe1\u3058\u308b\u306a\uff01 \u81ea\u4f5c\u30b7\u30b9\u30c6\u30e0\u3082\u9806\u8abf\u306b\u7d44\u307f\u3042\u304c\u308a\u3001\u73fe\u5728\u904b\u7528\u30c6\u30b9\u30c8\u4e2d\u3067\u3059\u3002 \u30de\u30cb\u30e5\u30a2\u30eb\u3082\u66f8\u304b\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u3067\u307e\u3060\u307e\u3060\u3084\u308b\u4e8b\u6ca2\u5c71\u3042\u308a\u307e\u3059\u304c\u3001\u81ea\u793e\u30c6\u30b9\u30c8\u3067\u306f\u30e4\u30d0\u3044\u304f\u3089\u3044\u5feb\u9069\u306b\u5546\u54c1\u60c5\u5831\u306e\u66f4\u65b0\u304c\u51fa\u6765\u3066\u3044\u307e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":29,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[34],"tags":[64,98,103,97,107,49,47,45,68],"class_list":["post-1305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-memorandum","tag-api","tag-php","tag-r-cabinet","tag-97","tag-107","tag-49","tag-47","tag-45","tag-68"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2018\/08\/nayamu2.jpg","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=1305"}],"version-history":[{"count":0,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1305\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/29"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=1305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=1305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=1305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}