The function “EXEC_REST_WS” is used to call an external/outgoing REST web service from ASYRESTCLI library and returns the status of the operation, the parameters used in the function are described below,
Parameter 1:
Code :NAME
Data Type :Char
Description : Name of the REST web service created.
Parameter 2:
Code :HTTPMETHOD
Data Type :Clbfile
Description : HTTP methods can be used on any endpoint which map to application create, read, update, and delete (CRUD) operations:
HTTP method | CRUD | Action |
GET | Read | Returns requested data |
POST | Create | Creates a new record |
PUT | Update | Updates an existing record |
DELETE | Delete | Deletes an existing record |
.
Parameter 3:
Code :SUBURL
Data Type :Char
Description : It is a sub-URL that appends to the main URL ,Main URL which specified while creating REST web service in x3.
Parameter 4:
Code :PARAM_COD
Data Type :Char Array
Description : Names that can be used as URL parameters.
Parameter 5:
Code :PARAM_VAL
Data Type : Char Array
Description : Values corresponding to property names defined in PARAMS_COD.
Parameter 6:
Code :HEADER_COD
Data Type : Char Array
Description : Names that can be sent in the request header as parameters..
Parameter 7:
Code :HEADER_VAL
Data Type : Char Array
Description :Values corresponding to property name defined in HEADER_COD.
Parameter 8:
Code :DATA
Data Type :Clbfile
Description : Data that is sent with POST and PUT methods.
Parameter 9:
Code :Mode
Data Type :Integer
Description : If 1, the web service is called in ‘future’ mode; if 0, the ‘wait’ mode is used.
The difference between Wait and Future mode, wait mode is synchronous , the call has to wait until receives a response back from the external REST web service, while on the Future ( asynchronous) a unique identifier is created, and you can later on retrieve the result of your external call with that UUID.
Parameter 10:
Code : RETURNS
Data Type :Char
Description : If empty, the whole JSON feed is returned in RESBODY; if not empty, only the value of the corresponding property is returned in RESBODY.
Parameter 11:
Code : RESHEAD
Data Type :Clbfile
Description : The response header returned by the web service.
Parameter 12:
Code : RESBODY
Data Type : Clbfile
Description : The response body returned by the web service.
Conclusion:
This blog helps to understand what are the parameters with its description and data type used in EXEC_REST_WS function and also how to use synchronous and asynchronous mode.
Related Keywords: REST web services,EXEC_REST_WS,ASYRESTCLI,Parameters of EXEC_REST_WS function, Wait and Future Mode, Synchronous and Asynchronous mode.
Subscribe for more blogs!!!
About Us
Greytrix – 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.
Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3, Sage Intacct, Sage 100, Sage 500, and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users, and Sage PSG worldwide. Greytrix helps in the migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature, Sage CRM CTI Framework.
Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework 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.
For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.