In this article you will find instructions on how to define Rest Web Services Layout data for use by Infogix Assure, that is fetched by invoking an external Rest Web Service. This layout can search and extract individual fields that exist within the JSON data payload extracted from the Rest Web Service response. Rest Web Service should be accessible from the Infogix Assure server environment.
To deploy a Rest Web Services Layout, an Admin will need to re-deploy Assure with the Rest Web Services Plugin JAR. Execute the following Infogix Assure deployment steps to add the Rest Web Services layout.
1. Copy the Rest Web Services Plugin JAR into a user defined Plugin folder in the Assure deployment.
2. Edit the IA.properties to ensure the PLUGIN_DIR property points to this user defined Plugin folder.
3. Execute the command “validate-config-values.bat IA” to validate the IA deployment configuration change.
4. Execute the command “deploy.bat IA” to re-deploy Infogix Assure with the Rest Web Services Plugin.
Creating a Rest Web Services Layout
To create a Rest Web Services Layout, complete the following steps in Infogix Assure:
1. Ensure that the Rest Web Services Plugin is installed within Infogix Assure
2. Log in to the product and click Rules -> Layouts
3. Click New Layout -> External Service
4. Select the “RestWebService Layout” from the list of available layouts, as shown below
5. Specify a name for your layout
6. Specify the URL of the Rest Web Service in the field “Rest API Endpoint”
7. Optionally, in case of a Secured Rest Web Service, set the field “Use Basic Authentication” to “true” and enter the username and password to access this Rest Web Service.
8. Enter the HTTP method to be used for the Rest Web Service in the field “HTTP Method.” The default value for this field is “GET” and additionally “POST” is also supported.
9. Optionally, in case the HTTP Method is “POST” enter the JSON message body that needs to be sent as part of the Rest Web Service request in the field “HTTP Request Template.”
10. Select the fields for extraction from the Rest Web Service response by selecting the Fields tab and clicking the “Generate” button. Once all the necessary fields are entered under the Details tab save the layout by clicking on the “Save” button.
11. Test the layout. To conduct a test, open the test dialog by clicking on the “Test Layout” button and click on the “Run” button. Once the records are captured and shown in the pop-up dialog, view the captured records by expanding on the appropriate record