Hi,
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