{"id":1973,"date":"2024-10-09T11:37:53","date_gmt":"2024-10-09T03:37:53","guid":{"rendered":"https:\/\/www.openbyt.com\/persuasion-is-often-more-effectual-than-force-2"},"modified":"2024-10-17T19:56:16","modified_gmt":"2024-10-17T11:56:16","slug":"persuasion-is-often-more-effectual-than-force-2","status":"publish","type":"post","link":"https:\/\/www.openbyt.com\/ja\/\u8aac\u5f97\u306f\u3057\u3070\u3057\u3070\u529b\u3088\u308a\u3082\u6709\u52b9\u3067\u3042\u308b-2","title":{"rendered":"WordPress REST API\u3092\u30de\u30b9\u30bf\u30fc\u3057\u307e\u3057\u3087\u3046\uff1a\u8a8d\u8a3c\u3068\u7d71\u5408"},"content":{"rendered":"<p><strong>REST API\u3068\u306f\u4f55\u3067\u3059\u304b\uff1f<\/strong><\/p><p><strong>REST API (Representational State Transfer Application Programming Interface) <\/strong>\u3068\u306f\u3001\u7570\u306a\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30b7\u30b9\u30c6\u30e0\u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e\u30eb\u30fc\u30eb\u30fb\u30bb\u30c3\u30c8\u3067\u3059\u3002API\u306f2\u3064\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u3064\u306a\u3050\u67b6\u3051\u6a4b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3001\u60c5\u5831\u3092\u8981\u6c42\u3057\u305f\u308a\u5171\u6709\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p><figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar.webp\" alt=\"\" class=\"wp-image-2249\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.23.43-An-illustration-of-how-a-REST-API-works.-Include-a-visual-representation-of-an-API-as-a-bridge-connecting-two-systems-a-client-and-a-server-with-ar-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p>REST API\u306e\u69cb\u6210\u8981\u7d20\u3092\u5206\u89e3\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff1a<\/p><ul class=\"wp-block-list\"><li><strong>API\uff08\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\uff09<\/strong>:API\u306f\u30ec\u30b9\u30c8\u30e9\u30f3\u306e\u30e1\u30cb\u30e5\u30fc\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u304d\u308b\u64cd\u4f5c\u306e\u30ea\u30b9\u30c8\u3092\u63d0\u4f9b\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u306f\uff08\u30b7\u30a7\u30d5\u306e\u3088\u3046\u306b\uff09\u3053\u308c\u3089\u306e\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n\n<li><strong>REST (\u8868\u73fe\u7684\u72b6\u614b\u9077\u79fb)<\/strong>:REST\u306f\u3001GET\u3001POST\u3001PUT\u3001DELETE\u306a\u3069\u306e\u6a19\u6e96\u7684\u306a\u64cd\u4f5c\u3092\u4f7f\u3063\u3066\u3001HTTP\u4e0a\u3067\u52d5\u4f5c\u3059\u308b\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u306e\u30bb\u30c3\u30c8\u3067\u3059\u3002<\/li><\/ul><figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform.webp\" alt=\"\" class=\"wp-image-2251\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.26.03-An-illustration-depicting-an-API-as-a-menu-in-a-restaurant.-Show-a-client-customer-selecting-from-a-menu-of-operations-with-a-server-chef-perform-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p><strong _msttexthash=\"32972290\" _msthash=\"186\">REST API\u306f\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u306e\u3067\u3059\u304b\uff1f<\/strong><\/p><p>REST API\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\uff08\u30d6\u30e9\u30a6\u30b6\u3084\u30a2\u30d7\u30ea\u306a\u3069\uff09\u304c\u30b5\u30fc\u30d0\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3001\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u3069\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u306e\u304b\u3001\u9806\u3092\u8ffd\u3063\u3066\u8aac\u660e\u3057\u307e\u3057\u3087\u3046\uff1a<\/p><ol class=\"wp-block-list\"><li><strong>\u304a\u5ba2\u69d8\u306e\u3054\u8981\u671b<\/strong>:\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\uff08\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff09\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u4e0a\u306e\u7279\u5b9a\u306e URL \u306b HTTP \u8981\u6c42\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002\u3053\u306eURL\u306f\u30ea\u30bd\u30fc\u30b9\uff08\u30e6\u30fc\u30b6\u30fc\u3001\u88fd\u54c1\u306a\u3069\uff09\u3092\u8868\u3057\u307e\u3059\u3002<ul class=\"wp-block-list\"><li>\u4f8bGET <code>https:\/\/api.example.com\/users<\/code> \u306f\u30e6\u30fc\u30b6\u30fc\u306e\u30ea\u30b9\u30c8\u3092\u8981\u6c42\u3057\u307e\u3059\u3002<\/li><\/ul><\/li>\n\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u51e6\u7406<\/strong>:\u30b5\u30fc\u30d0\u30fc\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u4fe1\u3057\u3001\u305d\u308c\u3092\u51e6\u7406\u3057\u3001\u30c7\u30fc\u30bf\uff08\u901a\u5e38\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\uff09\u3092\u53d6\u5f97\u3057\u3001\u5fdc\u7b54\u3092\u6e96\u5099\u3057\u307e\u3059\u3002<\/li>\n\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u306e\u5fdc\u7b54<\/strong>:\u30b5\u30fc\u30d0\u30fc\u306fHTTP\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u8fd4\u3057\u307e\u3059\u3002\u3053\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u306b\u306f<ul class=\"wp-block-list\"><li><strong>\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9<\/strong>:\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u6210\u529f\u3057\u305f\u304b\u3069\u3046\u304b\u3092\u793a\u3057\u307e\u3059\uff08\u6210\u529f\u3057\u305f\u5834\u5408\u306f200 OK\u3001\u30ea\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f404 Not Found\u306a\u3069\uff09\u3002<\/li>\n\n<li><strong>\u30c7\u30fc\u30bf<\/strong>:\u901a\u5e38\u306f JSON \u5f62\u5f0f\u3067\u3001\u8981\u6c42\u3055\u308c\u305f\u30ea\u30bd\u30fc\u30b9\u3092\u8868\u3057\u307e\u3059\u3002<\/li><\/ul><\/li><\/ol><figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve.webp\" alt=\"\" class=\"wp-image-2252\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.28.59-An-illustration-showing-the-process-of-a-client-sending-a-request-to-a-server.-Include-visuals-for-Client-Request-with-an-arrow-pointing-to-a-Serve-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p><strong>\u57fa\u672c\u8a8d\u8a3c\uff1a<\/strong> \u305d\u308c\u306f\u4f55\u3067\u3042\u308a\u3001\u306a\u305c\u91cd\u8981\u306a\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p><p><strong>\u57fa\u672c\u8a8d\u8a3c<\/strong> \u306f\u3001API \u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u969b\u306b\u30e6\u30fc\u30b6\u304c\u81ea\u5206\u306e\u8eab\u5143\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u7c21\u5358\u306a\u65b9\u6cd5\u3067\u3059\u3002\u3053\u306e\u65b9\u6cd5\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u305f\u30e6\u30fc\u30b6\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u9001\u4fe1\u3057\u3001\u30b5\u30fc\u30d0\u306f\u305d\u308c\u3092\u691c\u8a3c\u3057\u307e\u3059\u3002<\/p><p><strong>\u306a\u305c\u91cd\u8981\u306a\u306e\u304b<\/strong>:\u8a8d\u8a3c\u306b\u3088\u308a\u3001\u8a31\u53ef\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u3060\u3051\u304c\u30ea\u30bd\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p><p><strong>\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u306e\u3067\u3059\u304b\uff1f<\/strong>:\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u30b5\u30fc\u30d0\u30fc\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u3068\u304d\u3001\u305d\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u306f <code>\u8a8d\u53ef<\/code> \u30d8\u30c3\u30c0\u306b\u3001Base64 \u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u305f\u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p><p><strong>\u4f8b<\/strong><\/p><pre class=\"wp-block-code\"><code>\u8a8d\u8a3c\u30d9\u30fc\u30b7\u30c3\u30af dXNlcm5hbWU6cGFzc3dvcmQ=<\/code><\/pre><p>\u30b5\u30fc\u30d0\u30fc\u306f\u3053\u306e\u30d8\u30c3\u30c0\u30fc\u3092\u30c7\u30b3\u30fc\u30c9\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u6709\u52b9\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an.webp\" alt=\"\" class=\"wp-image-2255\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.34.10-An-illustration-explaining-Basic-Authentication-for-REST-API.-Show-a-simplified-visual-of-a-client-user-sending-an-HTTP-request-to-a-server-with-an-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p><strong>WordPress REST API\u306e\u8a8d\u8a3c\u65b9\u6cd5<\/strong><\/p><p>\u3067\u4f5c\u696d\u3059\u308b\u5834\u5408 <strong>WordPress REST API<\/strong>\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u3001\u3044\u304f\u3064\u304b\u306e\u8a8d\u8a3c\u65b9\u6cd5\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff1a<\/p><p><strong>1\uff1a\u57fa\u672c\u8a8d\u8a3c<\/strong><\/p><ul class=\"wp-block-list\"><li>\u3053\u306e\u65b9\u6cd5\u306f\u30c6\u30b9\u30c8\u3084\u7c21\u5358\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002WordPress \u306e\u30e6\u30fc\u30b6\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u306b\u9001\u308a\u307e\u3059\u3002<\/li>\n\n<li><strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d2\u30f3\u30c8<\/strong>:WordPress\u3067Basic\u8a8d\u8a3c\u3092\u4f7f\u3046\u306b\u306f <a href=\"https:\/\/github.com\/WP-API\/Basic-Auth\" target=\"_blank\" rel=\"noreferrer noopener\">\u57fa\u672c\u8a8d\u8a3c\u30d7\u30e9\u30b0\u30a4\u30f3<\/a>.\u3053\u306e\u65b9\u6cd5\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u554f\u984c\u304b\u3089\u672c\u756a\u74b0\u5883\u3067\u306f\u63a8\u5968\u3055\u308c\u307e\u305b\u3093\u3002<\/li><\/ul><p><strong>2\uff1a\u30af\u30c3\u30ad\u30fc\u8a8d\u8a3c<\/strong><\/p><ul class=\"wp-block-list\"><li>Cookie\u8a8d\u8a3c\u306f\u3001\u73fe\u5728\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u3092API\u306b\u30a2\u30af\u30bb\u30b9\u3055\u305b\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u304c WordPress \u306b\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3068\u30bb\u30c3\u30b7\u30e7\u30f3 Cookie \u304c\u4f5c\u6210\u3055\u308c\u3001API \u306f\u3053\u306e Cookie \u3092\u4f7f\u3063\u3066\u30e6\u30fc\u30b6\u30fc\u3092\u8a8d\u8a3c\u3057\u307e\u3059\u3002<\/li>\n\n<li><strong>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/strong>:\u3053\u308c\u306f\u3001WordPress\u30b5\u30a4\u30c8\u3068\u540c\u3058\u30c9\u30e1\u30a4\u30f3\u3067\u52d5\u4f5c\u3059\u308b\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9JavaScript\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u304f\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/li><\/ul><p><strong>3\uff1aOAuth\u8a8d\u8a3c<\/strong><\/p><ul class=\"wp-block-list\"><li>OAuth \u306f\u3088\u308a\u5b89\u5168\u306a\u65b9\u6cd5\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u30e6\u30fc\u30b6\u30fc\u306b\u4ee3\u308f\u3063\u3066 WordPress REST API \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/li>\n\n<li><strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f8b<\/strong>:OAuth 1.0a Server Plugin for WordPress \u3092\u4f7f\u7528\u3057\u3066\u3001OAuth \u30d9\u30fc\u30b9\u306e\u8a8d\u8a3c\u3092\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/li><\/ul><p><strong>4\uff1a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9<\/strong><\/p><ul class=\"wp-block-list\"><li>\u307e\u305f\u3001WordPress\u306f\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 <strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9<\/strong>\u3053\u308c\u306f\u3001API \u30a2\u30af\u30bb\u30b9\u7528\u306e\u4e00\u610f\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u3059\u3002WordPress\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u3053\u308c\u3089\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u8a8d\u8a3c\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n<li><strong>\u751f\u6210\u65b9\u6cd5<\/strong>:WordPress\u306e\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u307e\u3067\u30b9\u30af\u30ed\u30fc\u30eb\u30c0\u30a6\u30f3\u3057\u3001\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/li><\/ul><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p.webp\" alt=\"\" class=\"wp-image-2257\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.41.26-An-illustration-comparing-different-WordPress-REST-API-authentication-methods.-Include-visual-representations-for-Basic-Authentication-username-and-p-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p><strong>WordPress REST API\u3092\u4f7f\u3063\u305f\u958b\u767a\u306e\u6700\u5927\u5316<\/strong><\/p><p>WordPress REST API \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001WordPress \u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u5916\u304b\u3089 WordPress \u30b5\u30a4\u30c8\u3092\u64cd\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u5f37\u529b\u306a\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u958b\u767a\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff1a<\/p><p><strong>1\uff1a\u30ab\u30b9\u30bf\u30e0\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\uff1a<\/strong> \u30ab\u30b9\u30bf\u30e0\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u5229\u7528\u3067\u304d\u306a\u3044 WordPress \u30b5\u30a4\u30c8\u306e\u8ffd\u52a0\u30c7\u30fc\u30bf\u3092\u516c\u958b\u3067\u304d\u307e\u3059\u3002<\/p><ul class=\"wp-block-list\"><li><strong>\u4f5c\u6210\u65b9\u6cd5<\/strong>:\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 <code>register_rest_route()<\/code> \u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u65b0\u3057\u3044\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/li><\/ul><p>\u4f8b<\/p><pre class=\"wp-block-code\"><code>add_action('rest_api_init', function() {)\n  register_rest_route('myplugin\/v1', '\/custom-data\/', array(\n    'methods' =&gt; 'GET'\u3001\n    'callback' =&gt; 'my_custom_data_callback'\u3001\n  ));\n});\n\n\u95a2\u6570 my_custom_data_callback() {\n  return new WP_REST_Response(array('data' =&gt; 'Hello, world!'), 200)\uff1b\n}<\/code><\/pre><p><strong>2\uff1aJavaScript\u306e\u7d71\u5408\uff1a<\/strong> JavaScript \u3092\u4f7f\u7528\u3057\u3066 REST API \u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3001\u52d5\u7684\u3067\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001REST API \u7d4c\u7531\u3067 WordPress \u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3068\u3084\u308a\u3068\u308a\u3059\u308b React \u3084 Vue.js \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p><p><strong>\u5b9f\u4f8b<\/strong>:JavaScript\u3092\u4ecb\u3057\u3066REST API\u3068\u3084\u308a\u3068\u308a\u3059\u308b\u3053\u3068\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30da\u30fc\u30b8\u3092\u30ea\u30ed\u30fc\u30c9\u305b\u305a\u306b\u30b3\u30e1\u30f3\u30c8\u3092\u6295\u7a3f\u3067\u304d\u308b\u30ab\u30b9\u30bf\u30e0\u30b3\u30e1\u30f3\u30c8\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u3092\u60f3\u50cf\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr.webp\" alt=\"\" class=\"wp-image-2258\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.50.24-A-realistic-illustration-of-a-developer-working-on-WordPress-REST-API.-The-scene-includes-a-modern-workspace-with-a-developer-sitting-at-a-desk-in-fr-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p><strong>JavaScript\u306b\u3088\u308b\u8a8d\u8a3c\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u9001\u4fe1<\/strong><\/p><p>JavaScript \u3092\u4f7f\u3063\u3066\u8a8d\u8a3c\u3055\u308c\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308b\u306b\u306f\u3001 \u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u306b\u6b63\u3057\u3044\u8a8d\u8a3c\u60c5\u5831\u3084\u30c8\u30fc\u30af\u30f3\u3092\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070<\/p><pre class=\"wp-block-code\"><code>fetch('https:\/\/api.example.com\/users', {\n  \u30e1\u30bd\u30c3\u30c9: 'GET'\u3001\n  headers\uff1a{\n    'Authorization': 'Basic ' + btoa('username:password')\u3001\n    'Content-Type': 'application\/json'.\n  }\n})\n  .then(response =&gt; response.json())\n  .then(data =&gt; console.log(data))\uff1b<\/code><\/pre><p>\u3053\u306e\u4f8b\u3067\u306f\u3001btoa() \u95a2\u6570\u304c\u8a8d\u8a3c\u60c5\u5831\u3092 Base64 \u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3057\u3066\u4e00\u6b21\u8a8d\u8a3c\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri.webp\" alt=\"\" class=\"wp-image-2259\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-16.54.03-An-illustration-showing-a-developer-using-JavaScript-to-send-authenticated-requests-to-a-REST-API.-Include-a-visual-of-a-computer-screen-with-JavaScri-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><p><strong>\u30af\u30c3\u30ad\u30fc\u8a8d\u8a3c<\/strong><\/p><p>Cookie\u8a8d\u8a3c\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001WordPress\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u30bb\u30c3\u30b7\u30e7\u30f3Cookie\u3092\u4f7f\u7528\u3057\u3066REST API\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001\u305d\u306e\u4ed5\u7d44\u307f\u306e\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3067\u3059\uff1a<\/p><ol class=\"wp-block-list\"><li><strong>\u30ed\u30b0\u30a4\u30f3<\/strong> \u30e6\u30fc\u30b6\u30fc\u304cWordPress\u30b5\u30a4\u30c8\u306b\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3068\u3001WordPress\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u8a8d\u8a3c\u30af\u30c3\u30ad\u30fc\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n\n<li><strong>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u9001\u4fe1<\/strong>:\u3042\u306a\u305f\u306eJavaScript\u30b3\u30fc\u30c9\u304cREST API\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3068\u304d\u3001\u30d6\u30e9\u30a6\u30b6\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u306bCookie\u3092\u542b\u307f\u3001WordPress\u306f\u3069\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u3044\u308b\u304b\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li><\/ol><p><strong>WordPress HTTP API \u3067\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u9001\u4fe1<\/strong><\/p><p>\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 <strong>WordPress HTTP API<\/strong> \u3092\u4f7f\u7528\u3057\u3066 WordPress \u30b5\u30a4\u30c8\u5185\u304b\u3089\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002HTTP API \u306f\u3001WordPress \u304c REST API \u3068\u3084\u308a\u3068\u308a\u3059\u308b\u305f\u3081\u306b\u63d0\u4f9b\u3059\u308b\u95a2\u6570\u306e\u30bb\u30c3\u30c8\u3067\u3059\u3002<\/p><p>GET\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u9001\u4fe1\u4f8b\uff1a<\/p><pre class=\"wp-block-code\"><code>$response = wp_remote_get('https:\/\/api.example.com\/users')\uff1b\nif (is_wp_error($response)) { { $error_message = $response&gt;get_error_message()\n  $error_message = $response-&gt;get_error_message()\uff1b\n  echo \"\u4f55\u304b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f: $error_message\"\uff1b\n} else {\n  $body = wp_remote_retrieve_body($response)\uff1b\n  echo $body\uff1b\n}<\/code><\/pre><p>\u3053\u306e\u4f8b\u3067\u306f\u3001wp_remote_get() \u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u5916\u90e8 API \u306b GET \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p><h3 class=\"wp-block-heading\">\u6982\u8981<\/h3><p>\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f<\/p><ul class=\"wp-block-list\"><li><strong>REST API\u3068\u306f\uff1f<\/strong> \u307e\u305f\u3001\u3069\u306e\u3088\u3046\u306b\u3057\u3066\u7570\u306a\u308b\u30b7\u30b9\u30c6\u30e0\u9593\u306e\u901a\u4fe1\u3092\u53ef\u80fd\u306b\u3059\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/li>\n\n<li><strong>REST API\u306e\u4ed5\u7d44\u307f<\/strong>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u4f5c\u6210\u65b9\u6cd5\u3068\u51e6\u7406\u65b9\u6cd5\u3092\u542b\u307f\u307e\u3059\u3002<\/li>\n\n<li><strong>\u8a8d\u8a3c\u65b9\u6cd5<\/strong>Basic\u8a8d\u8a3c\u3001Cookie\u8a8d\u8a3c\u3001OAuth\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u3001\u8a8d\u8a3c\u306e\u7a2e\u985e\u3068\u305d\u306e\u5fc5\u8981\u6027\u3002<\/li>\n\n<li><strong>WordPress REST API \u8a8d\u8a3c<\/strong>JavaScript\u3068PHP\u3092\u4f7f\u3063\u3066\u8a8d\u8a3c\u3055\u308c\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u542b\u307f\u307e\u3059\u3002<\/li><\/ul><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end.webp\" alt=\"\" class=\"wp-image-2262\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.00.52-A-clear-and-engaging-illustration-summarizing-the-use-of-WordPress-REST-API-for-development.-Show-a-developer-at-a-computer-screen-creating-custom-end-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><h3 class=\"wp-block-heading\">\u3088\u304f\u3042\u308b\u8cea\u554fREST API\u3068\u8a8d\u8a3c\u306b\u95a2\u3059\u308b\u3088\u304f\u3042\u308b\u8cea\u554f<\/h3><ol class=\"wp-block-list\"><li><strong>\u8a8d\u8a3c\u306a\u3057\u3067REST API\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u304b\uff1f<\/strong><ul class=\"wp-block-list\"><li>\u306f\u3044\u3001\u305f\u3060\u3057\u516c\u958b\u30c7\u30fc\u30bf\u306e\u307f\u3067\u3059\u3002\u6a5f\u5bc6\u30c7\u30fc\u30bf\u306b\u3064\u3044\u3066\u306f\u3001\u9069\u5207\u306a\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059\u3002<\/li><\/ul><\/li>\n\n<li><strong>\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u306f\u5b89\u5168\u3067\u3059\u304b\uff1f<\/strong><ul class=\"wp-block-list\"><li>\u57fa\u672c\u8a8d\u8a3c\u306f\u3001\u8a8d\u8a3c\u60c5\u5831\u304c\u6697\u53f7\u5316\u3055\u308c\u305a\u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u308b\u305f\u3081\u3001\u672c\u756a\u74b0\u5883\u3067\u306f\u5b89\u5168\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30c6\u30b9\u30c8\u7528\u304b HTTPS \u3092\u4f7f\u3063\u305f\u8a8d\u8a3c\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/li><\/ul><\/li>\n\n<li><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u4f55\u306b\u4f7f\u3046\u306e\u3067\u3059\u304b\uff1f<\/strong><ul class=\"wp-block-list\"><li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u3001WordPress \u306e\u4e3b\u8981\u306a\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306a\u304f API \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8a8d\u8a3c\u3057\u307e\u3059\u3002\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7d71\u5408\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/li><\/ul><\/li><\/ol><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R.webp\" alt=\"\" class=\"wp-image-2263\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.03.17-An-illustration-summarizing-common-questions-about-REST-API-and-authentication-for-WordPress.-Include-visual-representations-of-key-FAQ-items_-using-R-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><h3 class=\"wp-block-heading\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/h3><ul class=\"wp-block-list\"><li><strong>\u8a8d\u8a3c\u306e\u7df4\u7fd2<\/strong>:\u30ed\u30fc\u30ab\u30eb\u306eWordPress\u30b5\u30a4\u30c8\u3067\u7570\u306a\u308b\u8a8d\u8a3c\u65b9\u6cd5\u3092\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n\n<li><strong>\u30ab\u30b9\u30bf\u30e0\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u4f5c\u6210<\/strong>:REST API \u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u3059\u308b\u305f\u3081\u306b\u3001WordPress \u3067\u30ab\u30b9\u30bf\u30e0\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/li>\n\n<li><strong>JavaScript\u3068PHP\u306e\u7d71\u5408<\/strong>:JavaScript (fetch \u306a\u3069) \u3068 PHP (WordPress HTTP API \u3092\u4f7f\u7528) \u3092\u4f7f\u3063\u3066\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u7df4\u7fd2\u3092\u3057\u307e\u3059\u3002<\/li>\n\n<li><strong>\u30c6\u30b9\u30c8\u306b\u30dd\u30b9\u30c8\u30de\u30f3\u3092\u4f7f\u7528<\/strong>:\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 <a href=\"https:\/\/www.postman.com\/\" target=\"_blank\" rel=\"noopener\">\u30dd\u30b9\u30c8\u30de\u30f3<\/a> \u3092\u4f7f\u7528\u3057\u3066 REST API \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u30c6\u30b9\u30c8\u3057\u3001\u8a8d\u8a3c\u3055\u308c\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u7df4\u7fd2\u3092\u3057\u307e\u3059\u3002<\/li><\/ul><p>\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u697d\u3057\u3093\u3067\u304f\u3060\u3055\u3044\uff01REST API\u306f\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3042\u308a\u3001\u305d\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u30a6\u30a7\u30d6\u958b\u767a\u306b\u304a\u3051\u308b\u7121\u9650\u306e\u53ef\u80fd\u6027\u304c\u958b\u3051\u307e\u3059\u3002<\/p><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe.webp\" alt=\"\" class=\"wp-image-2264\" srcset=\"https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe.webp 1024w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe-600x600.webp 600w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe-100x100.webp 100w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe-300x300.webp 300w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe-150x150.webp 150w, https:\/\/www.openbyt.com\/wp-content\/uploads\/2024\/10\/DALL\u00b7E-2024-10-10-17.04.49-An-illustration-summarizing-next-steps-for-practicing-WordPress-REST-API-development.-Show-a-developers-workspace-with-elements-like-practicing-diffe-768x768.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>REST API\u3068\u306f\u4f55\u3067\u3059\u304b\uff1fREST API\uff08Representational State Transfer Application Programming Interface\uff09\u3068\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30b7\u30b9\u30c6\u30e0\u304c...<\/p>","protected":false},"author":1,"featured_media":3107,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,78],"tags":[191,193,192,190],"class_list":["post-1973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rest-api","category-rest-api-use","tag-authenticationmethods","tag-javascriptintegration","tag-webdevelopment","tag-wordpressrestapi",""],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/posts\/1973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/comments?post=1973"}],"version-history":[{"count":11,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/posts\/1973\/revisions"}],"predecessor-version":[{"id":3191,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/posts\/1973\/revisions\/3191"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/media\/3107"}],"wp:attachment":[{"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/media?parent=1973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/categories?post=1973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.openbyt.com\/ja\/wp-json\/wp\/v2\/tags?post=1973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}