Hi,
Would like to ask if it is possible to create an API that will get the data from an external database (e.g. MSSQL) while the database name changes over a specific time (e.g. annually) without the need to republish the module or consumers.
Appreciate any help or information.
Could you please help to explain your requirement because I am not able to understand why you want to consume external database via API when you can integrate it directly in OutSystems.
You just need to create connection with external database and you are good to go. Apart from this if database name get change in future anytime then you just need to update the db name in connection settings and it will not impact anything in the application until entity name and attributes are same.
regards
Hello, the client will consume that API to get the data from the external database.
So in this case I think you need to follow below 2 steps :
1. Connect with external database as suggested. Then you will get the access of external database in your OutSystems application.
2. Expose the APIs to be consumed by client from your OutSystems application. In these API you will get the result from external database tables.
yes, I tried changing the database name in the database connection, but it requires an update/refresh to the factory. Client wanted to change the database name without doing that.
I don't think so, when you update the database name in database connection on save it shows a popup that you want to apply this settings for all modules and factory. You just need to click on it. So it will send update to all the consumer thats all. But in this case you don't need to update the dependency in any table or no need to republish.
I recommend using Hubway Connect. This forge component has lots of great features like connecting your OutSystems app's database with other applications, it is also very easy to use to manage API's. You might want to check this it out as it might be the one you need. Hope this helps.
https://www.outsystems.com/forge/component-overview/13087/hubway-connect
Thank you and regards,
Elizer