When i should go for direct database connection to get the data from database vs REST API to get data from database.
What are the pros & cons of each approach. Detailed help is highly appreciated.
Discussion posts and replies are publicly visible
The only reason I would consider a service (which is going to require a completely different skill set with a separate team to create / maintain the thing) would be for data security, integrity, and transactional stablility, i.e. ACID compliance. That would render the REST service moot, because REST can't handle ACID compliant transactions. So I would never replace Appian's built in DB connection for a REST API. If the need arose I would, however, very strongly recommend replacing Appian's built in DB connection for a SOAP API. If you're doing a bank transaction, anything with money, or things that need exceedingly strict control on the database transactions, such as all-or-nothing mandated, you would probably do well to use SOAP service instead of Appian. In my opinion, there's no condition where I'd rather use REST than Appian.