{"id":20100,"date":"2020-07-01T10:15:04","date_gmt":"2020-07-01T10:15:04","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=20100"},"modified":"2022-03-09T10:05:46","modified_gmt":"2022-03-09T10:05:46","slug":"the-narration-of-function-and-its-parameter-used-to-call-an-external-outgoing-rest-web-service-from-asyrrestcli-library","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2020\/07\/01\/the-narration-of-function-and-its-parameter-used-to-call-an-external-outgoing-rest-web-service-from-asyrrestcli-library\/","title":{"rendered":"The narration of function and its parameter used to call an external\/outgoing REST web service from ASYRRESTCLI library"},"content":{"rendered":"\n<p>The function &#8220;EXEC_REST_WS&#8221; is used to call an\nexternal\/outgoing REST web service from ASYRESTCLI library and returns the\nstatus of the operation, the&nbsp; parameters\nused in the function are described below,<\/p>\n\n\n\n\n\n<p><strong>Parameter\n1:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>NAME<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Char<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>Name of the REST web service created.<\/p>\n\n\n\n<p><strong>Parameter 2:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>HTTPMETHOD<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Clbfile<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>HTTP methods can be used on any endpoint\nwhich map to application create, read, update, and delete (CRUD) operations:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>\n   <strong>HTTP method<\/strong>\n   <\/td><td>\n   <strong>CRUD<\/strong>\n   <\/td><td>\n   <strong>Action<\/strong>\n   <\/td><\/tr><\/thead><tbody><tr><td>\n  GET\n  <\/td><td>\n  Read\n  <\/td><td>\n  Returns requested data\n  <\/td><\/tr><tr><td>\n  POST\n  <\/td><td>\n  Create\n  <\/td><td>\n  Creates a new record\n  <\/td><\/tr><tr><td>\n  PUT \n  <\/td><td>\n  Update\n  <\/td><td>\n  Updates an existing record\n  <\/td><\/tr><tr><td>\n  DELETE\n  <\/td><td>\n  Delete\n  <\/td><td>\n  Deletes an existing record\n  <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>.<\/p>\n\n\n\n<p><strong>Parameter 3:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>SUBURL<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Char<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> It is a sub-URL that appends to the main\nURL ,Main URL which specified while creating REST web service in x3.<\/p>\n\n\n\n<p><strong>Parameter 4:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>PARAM_COD<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Char Array<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>Names that can be used as URL parameters.<\/p>\n\n\n\n<p><strong>Parameter 5:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>PARAM_VAL<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> Char Array<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>Values corresponding to property names\ndefined in PARAMS_COD.<\/p>\n\n\n\n<p><strong>Parameter 6:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>HEADER_COD<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> Char Array<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>Names that can be sent in the request header\nas parameters..<\/p>\n\n\n\n<p><strong>Parameter 7:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>HEADER_VAL<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> Char Array<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Values corresponding to property name\ndefined in HEADER_COD.<\/p>\n\n\n\n<p><strong>Parameter 8:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>DATA<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Clbfile<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>Data that is sent with POST and PUT methods.<\/p>\n\n\n\n<p><strong>Parameter 9:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Mode<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Integer<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>If 1, the web service is called in &#8216;future&#8217;\nmode; if 0, the &#8216;wait&#8217; mode is used.<\/p>\n\n\n\n<p>The difference between Wait and Future mode, wait mode is synchronous ,\nthe call has to wait until receives a response back from the external REST web\nservice, while on the Future ( asynchronous) a unique identifier is created,\nand you can later on retrieve the result of your external call &nbsp;with that\nUUID.<\/p>\n\n\n\n<p><strong>Parameter 10:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> RETURNS<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Char<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>If empty, the whole JSON feed is returned in\nRESBODY; if not empty, only the value of the corresponding property is returned\nin RESBODY.<\/p>\n\n\n\n<p><strong>Parameter 11:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> RESHEAD<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong>Clbfile<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; : <\/strong>The response header returned by the web\nservice.<\/p>\n\n\n\n<p><strong>Parameter 12:<\/strong><\/p>\n\n\n\n<p><strong>Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> RESBODY<\/p>\n\n\n\n<p><strong>Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> Clbfile<\/p>\n\n\n\n<p><strong>Description&nbsp;&nbsp;&nbsp;&nbsp; :<\/strong> The response body returned by the web\nservice.<\/p>\n\n\n\n<p><strong>Conclusion:<\/strong><\/p>\n\n\n\n<p>This blog helps\nto understand what are the parameters with&nbsp;\nits description and data type &nbsp;used in EXEC_REST_WS function and also how to\nuse synchronous and asynchronous mode.<\/p>\n\n\n\n<p><strong>Related Keywords:<\/strong> REST web\nservices,EXEC_REST_WS,ASYRESTCLI,Parameters of EXEC_REST_WS function, Wait and\nFuture Mode, Synchronous and Asynchronous mode.<\/p>\n\n\n\n<p><strong>Subscribe for more blogs!!!<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>About Us<\/strong><\/h2>\n\n\n\n<p>Greytrix \u2013 a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.<\/p>\n\n\n\n<p id=\"block-28013e99-0882-44c6-b705-7b16c85053b2\">Greytrix&nbsp;has some unique integration solutions developed for&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-crm\/\">Sage CRM<\/a>&nbsp;with Sage ERPs&nbsp;namely&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\">Sage X3<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-intacct\/\">Sage Intacct<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-100-erp\/\">Sage 100<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-500-erp\/\">Sage 500<\/a>,&nbsp;and&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-300-erp\/\">Sage 300<\/a>. We also offer best-in-class&nbsp;Sage ERP&nbsp;and&nbsp;Sage CRM&nbsp;customization and development services&nbsp;to&nbsp;Business&nbsp;Partners,&nbsp;End&nbsp;Users, and Sage PSG worldwide. Greytrix&nbsp;helps in&nbsp;the migration of Sage CRM from&nbsp;Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes&nbsp;addons like&nbsp;&nbsp;Greytrix Business Manager,&nbsp;Sage CRM Project Manager,&nbsp;Sage CRM Resource Planner,&nbsp;Sage CRM Contract Manager,&nbsp;Sage CRM Event Manager,&nbsp;Sage CRM Budget Planner,&nbsp;Gmail Integration,&nbsp;Sage CRM Mobile Service Signature,&nbsp;Sage CRM CTI Framework.<\/p>\n\n\n\n<p id=\"block-4bc42a09-fb13-4598-8137-ce5f7b91ce28\">Greytrix is a recognized&nbsp;Sage Champion Partner&nbsp;for GUMU&#x2122; Sage X3 \u2013 Sage CRM integration listed on&nbsp;<a href=\"https:\/\/www.sage.com\/marketplace\/asb_ListingDetail?listingId=a1h24000007PC3aAAG\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Marketplace<\/a>&nbsp;and Sage CRM \u2013 Sage Intacct integration listed on&nbsp;<a href=\"https:\/\/marketplace.intacct.com\/MPListing?lid=a2D0H000007kiHyUAI\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Intacct Marketplace<\/a>. The&nbsp;<a href=\"https:\/\/www.greytrix.com\/gumu\/\" target=\"_blank\" rel=\"noreferrer noopener\">GUMU&#x2122; Cloud framework<\/a>&nbsp;by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.<\/p>\n\n\n\n<p id=\"block-76376301-1c3e-4250-8a09-727595a606f0\">For more information on our integration solutions, please contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The function &#8220;EXEC_REST_WS&#8221; is used to call an external\/outgoing REST web service from ASYRESTCLI library and returns the status of the operation, the&nbsp; parameters used in the function are described below, Parameter 1: Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :NAME Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :Char Description&nbsp;&nbsp;&nbsp;&nbsp; : Name of the REST web service created. Parameter 2: Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :HTTPMETHOD Data Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :Clbfile Description&nbsp;&nbsp;&nbsp;&nbsp;\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2020\/07\/01\/the-narration-of-function-and-its-parameter-used-to-call-an-external-outgoing-rest-web-service-from-asyrrestcli-library\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,2796,11],"tags":[3008,3004,3006,2398],"class_list":["post-20100","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-technical","category-tips","tag-asyrrestcll","tag-narration-of-function","tag-rest-web-service","tag-web-service"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/20100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=20100"}],"version-history":[{"count":2,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/20100\/revisions"}],"predecessor-version":[{"id":24776,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/20100\/revisions\/24776"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=20100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=20100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=20100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}