Steps to Create a Consumable REST API
This help page contains a short description of the steps to take when creating a new Consumable REST API.
- Create a new Consumable REST API in the Enterprise Repository view and set the Name and Description of the web service object.
- Open the OpenAPI JSON screen and load the OpenAPI specification of the Web Service from a JSON file by clicking on
the 'Load JSON File' button. See OpenAPI
JSON.
Alternatively paths and operations of a REST API can be added manually on the Definitions screen of the consumable REST API. Class definitions of the REST API can be added to the Implementation screen.
If possible, the usage of an OpenAPI JSON file is advised. - Open the Definitions screen. Here you can check if the REST API web service has been correctly loaded and the mapping of native data types to AMT types can be adjusted.
- After saving the newly created Consumable REST API and checking it in, the new Consumable REST API routines
can be called from both Reports and Forms.
The routines can be called with the following syntax: <Out parameter / Result> := <Consumable REST API name>.<Routine name> (<In parameters>) - After generation of the Consumable REST API it has to be imported into the Control Center, see Control Center -> System Configuration -> Batch & Forms -> Tab REST API Consumables.
- Once imported in the Control Center, the Consumable REST API should be configured by editing the entries. For example to set or change the address of the web service or to configure and enable an authentication header.