{"id":25151,"date":"2023-11-13T13:23:47","date_gmt":"2023-11-13T04:23:47","guid":{"rendered":"https:\/\/docs.c-bot.pro\/?p=25151"},"modified":"2025-07-15T14:16:15","modified_gmt":"2025-07-15T05:16:15","slug":"request_to_rest_api","status":"publish","type":"post","link":"https:\/\/docs.c-bot.pro\/en\/user_guide\/bot\/b-bot_editer\/extension\/api_integration\/request_to_rest_api\/","title":{"rendered":"API integration \/ Request to REST API"},"content":{"rendered":"\n<p><a href=\"https:\/\/docs.c-bot.pro\/en\/\"><i class=\"fas fa-book\"><\/i>&nbsp;Home<\/a> &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/user_guide\">User guide<\/a> &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/user_guide\/bot\/\">BOT<\/a>  &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/user_guide\/bot\/b-bot_editer\">How to use the BOT editor<\/a> &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/user_guide\/bot\/b-bot_editer\/extension\">Extension<\/a> &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/user_guide\/bot\/b-bot_editer\/extension\/api_integration\">API intgration<\/a> &gt;  Request to REST API<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full is-resized extension_icon\"><img loading=\"lazy\" decoding=\"async\" width=\"272\" height=\"272\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/11\/icon_96p_api.png\" alt=\"\" class=\"wp-image-25105\" style=\"width:75px;height:75px\"\/><\/figure>\n\n\n\n<h2 id=\"outline__1\" class=\"wp-block-heading\">App overview<\/h2>\n\n\n\n<p>Sends requests to any REST API and retrieves responses. It also allows requests from within the LAN via the communication pathway of a Virtual browser.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Extended Feature URL<\/td><td>cbot-extension:\/\/cloud-bot:api:request-to-rest:2<\/td><\/tr><tr><td>Provider<\/td><td>Cloud BOT <span style=\"margin-left: 2px ; padding: 2px 7px; border:0px solid #000 ; background-color: #007bff ; border-radius: 5px ; color: #ffffff ; font-size: 0.7em;\" class=\"badge\">official<\/span><\/td><\/tr><tr><td>External communication<\/td><td>Yes<\/td><\/tr><tr><td>Version<\/td><td>2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"outline__2\" class=\"wp-block-heading\">Screen description<\/h2>\n\n\n\n<h3 id=\"outline__2_1\" class=\"wp-block-heading\">Input screen<\/h3>\n\n\n\n<h4 id=\"outline__2_1_1\" class=\"wp-block-heading\">Request options<\/h4>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"1024\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2024\/09\/img_api_option_en-702x1024.png\" alt=\"\" class=\"wp-image-30754\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-black-color has-text-color\"><strong>Method<\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Select the request method.<br><small>\uff08GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH\uff09 <\/small><\/p>\n\n\n\n<p><strong><strong>Endpoint<\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Specifies the request endpoint.<\/p>\n\n\n\n<p><strong><strong>Query parameters<\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Specifies the URL query parameters (KEY,VALUE). You can add or delete as needed.<\/p>\n\n\n\n<p><strong><strong>Headers<\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Specify the request headers (KEY,VALUE). You can add or delete as needed.<\/p>\n\n\n\n<p><strong><strong>Method of specifying the body<\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Select the method to specifies the request body.<br><small>(text, file, multipart\/form-data) <\/small><br><small>* <a href=\"#outline__2_3\" data-type=\"internal\" data-id=\"#outline__2_3_2\">Please refer to this<\/a> for information on how to specify the body.<\/small><\/p>\n\n\n\n<p><strong><strong>Body<\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Specifies the request body.<\/p>\n\n\n\n<p><strong>Output Items<\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Select the items to output on the results screen.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Response body (Text) : Display the response body as text.<\/li>\n\n\n\n<li>Response body (Download) : Display a button to download the response body file.<\/li>\n\n\n\n<li>Request body : Display the contents of the requested body.<\/li>\n<\/ul>\n\n\n\n<p><strong><strong><strong>Communication pathway<\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Select the communication pathway.<br><small>* Click <a href=\"https:\/\/docs.c-bot.pro\/en\/user_guide\/bot\/b-bot_editer\/extension\/about_communication_paths\/\" data-type=\"internal\" data-id=\"#outline__2_3_2\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> to learn more about REST API communication pathway.<\/small><\/p>\n<\/div>\n<\/div>\n\n\n\n<h3 id=\"outline__2_2\" class=\"wp-block-heading\">Result screen<\/h3>\n\n\n\n<h4 id=\"outline__2_2_1\" class=\"wp-block-heading\">Response<\/h4>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"1024\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2024\/09\/img_api_response_en-670x1024.png\" alt=\"\" class=\"wp-image-30755\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>The result of the request made on the input screen will be displayed.<\/p>\n\n\n\n<p><strong><strong><strong>Status code<\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Response status code will be displayed.<\/p>\n\n\n\n<p><strong><strong><strong>Status<\/strong><\/strong> text<\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Response status text will be displayed.<\/p>\n\n\n\n<p><strong><strong><strong>Headers<\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Response headers will be displayed.<\/p>\n\n\n\n<p><strong>Response body (Text)<\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">The response body will be displayed as text.<\/p>\n\n\n\n<p><strong>Response body (Download)<\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">Download the response body file.<\/p>\n\n\n\n<p><strong><strong><strong>Request body<\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"extension_detail_item_body\">The content of the requested body will be displayed.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h3 id=\"outline__2_3\" class=\"wp-block-heading\"><strong>Additional explanation<\/strong> <strong>on how to specify the body<\/strong><\/h3>\n\n\n\n<h4 id=\"outline__2_3_1\" class=\"wp-block-heading\"><strong><strong>Enter the body text<\/strong><\/strong><\/h4>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"422\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2024\/09\/img_api_body_text_en-1024x422.png\" alt=\"\" class=\"wp-image-30756\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Enter the request body as text.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h4 id=\"outline__2_3_2\" class=\"wp-block-heading\"><strong><strong><strong>Reference the body from a file <\/strong><\/strong><\/strong><\/h4>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"247\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2024\/09\/img_api_body_file_en-1024x247.png\" alt=\"\" class=\"wp-image-30757\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>References the request body to a file.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h4 id=\"outline__2_3_3\" class=\"wp-block-heading\"><strong>Create multipart\/form-data<\/strong><\/h4>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2024\/09\/img_api_body_multipart_form_en-1024x577.png\" alt=\"\" class=\"wp-image-30758\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Create a multipart\/form-data request body.<br>The number of parts can be added or deleted as needed.<\/p>\n\n\n\n<p><strong>Body (Text)<\/strong><\/p>\n\n\n\n<p>Used for text entry of Value.<\/p>\n\n\n\n<p><strong>Body (File)<\/strong><\/p>\n\n\n\n<p>Used when Value is referenced to a file.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Key: Part Name.<\/li>\n\n\n\n<li>Value: The body part of the part.<\/li>\n\n\n\n<li>Content-Type (Optional): Part MIME type.<\/li>\n\n\n\n<li>Filename (Optional): The file name of the part.<\/li>\n<\/ul>\n\n\n\n<p><strong>Part Structure<\/strong><\/p>\n\n\n\n<p>The part structure of the body with multipart\/form-data is as follows.<\/p>\n\n\n\n<p>--Boundary<br>Content-Disposition: form-data; name=\"[Key]\" filename=\"[Filename]\"<br>Content-Type: [Content-Type]<\/p>\n\n\n\n<p>[Value]<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;Home &gt; User guide &gt; BOT &gt; How to use the BOT editor &gt; Extension &gt; API intgration &gt; Request to REST API App overview Sends requests to any REST API and retrieves responses. It also allows requests from within the LAN via the communication pathway of a Virtual browser. Extended Feature URL cbot-extension:\/\/cloud-bot:api:request-to-rest:2 Provider Cloud BOT official External communication Yes Version 2 Screen description Input screen Request options Method Select the request method.\uff08GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH\uff09 Endpoint Specifies the request endpoint. Query parameters Specifies the URL query parameters (KEY,VALUE). You can add or delete as needed. Headers Specify the request headers (KEY,VALUE). You can add or delete as needed. Method of specifying the body Select the method to specifies the request body.(text, file, multipart\/form-data) * Please refer to this for information on how to specify the body. Body Specifies the request body. Output Items Select the items to output on the results screen. Communication pathway Select the communication pathway.* Click here to learn more about REST API communication pathway. Result screen Response The result of the request made on the input screen will be displayed. Status code Response status code will be displayed. Status text Response [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_locale":"en_US","_original_post":"https:\/\/docs.c-bot.pro\/?p=25108","footnotes":""},"categories":[65],"tags":[12,66],"class_list":["post-25151","post","type-post","status-publish","format-standard","hentry","category-api_integration","tag-api","tag-extension","en-US"],"_links":{"self":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts\/25151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/comments?post=25151"}],"version-history":[{"count":10,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts\/25151\/revisions"}],"predecessor-version":[{"id":33168,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts\/25151\/revisions\/33168"}],"wp:attachment":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/media?parent=25151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/categories?post=25151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/tags?post=25151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}