This API Fortress Helper utility allows you to access databases via an API.
Place the package in a machine that has access to the databases that you wish to use, and which could be reached by API Fortress via HTTP.
As a default, the system will connect to PostgreSQL, but you can configure it to run against any DB that can be accessed with JDBC.
Of course, this requires a bit more configuration located in apps/db-api-helper/db-api-helper.xml. Next steps are pretty straight forward.
Look for the following element:
If you plan to use another database, you will need to download the matching JDBC driver, place it in the apps/db-api-helper/lib directory, and configure the flow accordingly.
In our example, hitting the route like this:
will trigger a select query that will return the result as a JSON array payload.
DELETE routes are also available and they work similarly.
It’s as easy as: