The narration of function and its parameter used to call an external/outgoing REST web service from ASYRRESTCLI library

By | July 1, 2020

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.


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 Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, 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 caters to a wide range of Sage X3, a Sage Business Cloud Solution, offerings. Our unique GUMU™ integrations include Sage X3 for Sage, Dynamics 365 CRM and Magento eCommerce along with Implementation and Technical Support worldwide for Sage X3. Currently we are Sage X3 Implementation Partner in East Africa, Middle East, Australia, Asia, US, UK. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight  and Letter of Credit and India Legislation for Sage X3 to Sage business partners, end users and Sage PSG worldwide. Greytrix Sales Commission App for Sage X3 simplifies commission calculations and postings on sales transactions.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

Greytrix is a recognized Sage champion ISV Partner for GUMU™ Sage X3 – Sage CRM integration also listed on Sage Marketplace; GUMU™ integration for Sage X3 – Salesforce is a 5-star rated app listed on Salesforce AppExchange and GUMU™ integration for Dynamics 365 CRM – Sage ERP listed on Microsoft AppSource.

For more information on Sage X3 Integration and Services, please contact us at, We would like to hear from you.