Accessing Rest API Services from Server-side Xbasic Code
How to access Rest API Services using Xbasic.
Using this part of Alpha Anywhere requires a feature key. You can add a feature key for a feature pack in the 'Tools' menu. After opening the 'Tools' menu select the 'Feature Packs' option and then 'Install Optional Feature Packs'. After the 'Enable/Disable Optional Features' dialog opens, click 'Add a New Feature' button and then type in the feature key, or license number, provided for Rest API services and click OK. For a visual explanation on accessing Rest API Services from Xbasic watch this video or follow the guide below.
First open the Interactive window.
Right click the mouse buttons and select the 'Genies' option. Then select the 'REST Reference Call...' option.
The 'Pick a REST Service and Method' dialog will open. Select the Service that you want to view in the 'Service' menu. A list of methods for that service will appear in the 'Method' list on the right.
Select a method to call by highlighting it in the 'Method' list.
The code at the bottom of the 'Pick a REST Service and Method' dialog is the Xbasic that you will need to execute in order to call the selected method.
Once a rest service has been defined calling your service from Xbasic is very easy because the genie will generate the code for you.