> there's nothing wrong with querying the fintech's DB as long as we're treating infosec seriously This is an unfortunate attitude. From a software architecture point of view, you're hard-coupling your software to that database which can create brittleness: You're at the mercy of the original database schema which may not be optimal, carries it's own tech debt, may require translations to your own implementation, and…
> You're at the mercy of the original database schema SQL has views. As long as you can represent the underlying data through a view you should be fine. > and may cause mistakes in interpretation in anything of scale All APIs have this concern. > direct access to a database is an unnecessary security risk You can constrain access to be read-only and to only access the particular view or views necessary. > has found p…
This, and it doesn't have to be SQL, a number of other databases have similar concepts.
If you have a separate schema with views (in SQL terms), and the rest is either entirely walled off or available on a "you have been warned" basis, then this is simply an API with a clear contract, just a flexible one (not entirely unlike a GraphQL endpoint) and available over a less common (for APIs) protocol.
It can be risky for the API provider, though, unless it's a proper multi-tenant database. Given that those are less common, and, I guess, potentially harder to manage, it's probably why database access APIs are rare.