Edge2Web Director is a comprehensive suite of powerful features to build interactive web applications with minimal code. User can take advantage of it’s in built connectivity with MindSphere and its plethora of products like Asset Manager, Time Series, Mind Connect IoT Extension and more. But, in order to connect to any external Data Sources like MySQL Database or a REST Endpoint we need to create a separate Connection and configure it to fetch data from these external Sources into MindSphere.
REST Integration between Edge2Web and MySQL
REST Connection
We have integrated a REST API which fetches data from MySQL DB and provides a JSON String as Output. This REST Endpoint is exposed using AWS API Gateway which also provides the Swagger JSON which is necessary to configure the connector in Edge2Web. The Endpoint is also secured using OAuth 2.0 authentication.
REST Call:
We need to use the Connection in a Flow in order to trigger it and fetch the data as in below image.
The connection produces an output JSON as below which we can further sanitize and transform if required before we use it for a Dashboard or plot a Time Series Line chart / Graph.