{"id":31815,"date":"2018-03-12T12:26:25","date_gmt":"2018-03-12T20:26:25","guid":{"rendered":"https:\/\/ephesoft.com\/docs\/2019-1-2\/moduleplugin-configuration\/extraction-module\/custom-rest-api-lookup\/"},"modified":"2020-11-24T09:52:34","modified_gmt":"2020-11-24T16:52:34","slug":"custom-rest-api-lookup","status":"publish","type":"docs","link":"https:\/\/ephesoft.com\/docs\/products\/transact\/features-and-functions\/administrator\/moduleplugin-configuration\/extraction-module\/custom-rest-api-lookup\/","title":{"rendered":"REST API Lookup Plugin"},"content":{"rendered":"
Ephesoft Transact 4.5.0.0 now supports REST API Lookup. It is used to extract the document level fields of a document on basis of the Web Service response. With REST API Lookup, there is no need to provide direct access to the databases or create special scripts for REST API based extraction. Now, all configurations can be done directly from the UI.<\/p>\n
This feature has been implemented as a separate extraction plugin at the Batch Class level, configuration section at the Document Type level and a lookup functionality on the Validation screen. It provides the same user experience as the Fuzzy DB Lookup. However, rather than extracting the Index Fields directly from the database, it is passing configured values to a REST Web Service in the customer environment, and the Web Service returns XML\/JSON response back to Ephesoft Transact. The application parses the response and extracts the required information according to the mapped XPath\/JSONPath strings. The extracted values are then mapped to the Index Fields created for the Document Types.<\/p>\n
REST API Lookup can be configured in two ways:<\/p>\n
REST API Lookup has been implemented as a group based lookup much like the Fuzzy DB extraction. The user can create multiple groups for a Document Type with each group having different URL\/JAR and a different set of mapped columns. Each group can be assigned a specific weight, which will be used to select the primary value out of results from separate groups. If no weights are specified, the first result from the first group will be selected as a primary value.<\/p>\n
If REST API Lookup is used along with Key-Value Extraction Rules, the system will first extract the values based on the configured KV Extraction and then will use this data to map and lookup remaining values using the Web Service.<\/p>\n
1. In the Extraction module, drag and drop the REST_API_LOOKUP Plugin<\/strong> into the Selected Plugins <\/strong>field. Note that it should always be placed after<\/em> the KEY_VALUE_EXTRACTION<\/strong> plugin.<\/p>\n <\/p>\n 2. On the REST_API_LOOKUP Plugin<\/strong> Configuration<\/strong> screen, make sure that the Rest API Lookup Plugin Switch<\/strong> is ON.<\/p>\n <\/p>\n 1. Navigate to the REST API Lookup<\/strong> tab which is available for each Document Type.<\/p>\n <\/p>\n 2. Click Add<\/strong> to add a new group. The left-side menu will be disabled, and the following screen will be displayed:<\/p>\n <\/p>\n 3. On the REST API Lookup Configuration<\/strong> screen, provide the Group Name,<\/strong> and select the REST URL Lookup<\/strong> option.<\/p>\n <\/p>\n 4. Fill in the Connection Details<\/strong> section.<\/p>\n <\/p>\n<\/a>Configure REST API Lookup using the Web Service URL<\/h2>\n