Appendix B SAmple Code Note You can install the node-Red library for integration like mySQl, mongodB, Swagger, etc. in a Flow-based wiring tool from the following location: https:// flows.nodered.org/ Apache Camel Apache Camel (http://camel.apache.org/) provides lot of useful components that support many libraries and frameworks such as Hibernate, Apache Spark, Apache- CXF, Apache Kafka, Restlet, Servlet, FTP, etc. These framework helps in integrating data between two different systems. For example, using the Camel Servlet or Camel Restlet, you can pull data from web services, transform it, and send it to another system or front- end application over REST API calls. Prerequisite step: • Swagger mocking API server should be running before moving forward. In this application, we go over an integration example: • Reading the account and transaction data from the Swagger API specification • You can calculate the total balance in the controller, which fetches data from mock API and exposes another transformed API. • Send the transformed API to an Angular application over REST API calls. Here are the full details of the example: • Read the data from Swagger API endpoints. • Access the API content and perform the transformation using a custom processor. • Create the Camel routes to expose the new API endpoint. 346
![Building Digital Experience Platforms - Page 356](/cdn-cgi/image/width=600,quality=80,format=webp/https://cdn.relayto.com/images_originals/600ee87725ad8.jpeg)