Patent attributes
An application programming interface gateway service generates an application programming interface that, in various examples, allows client applications to access database functionality without maintaining active database connections, managing database credentials, or providing SQL code. The application programming interface maintains state information between invocations that allows for improved database performance. The state information may include SQL statements and subroutines, compiled SQL code, database credentials, active database connections, and connection pools. When invoked by a client application, the application programming interface may select an active database connection from a connection pool based at least in part on the activity history of each connection in the connection pool so that the expected cache performance of the database may be improved. Access to the application programming interface may be controlled via fine-grained access controls independent of the credentials used to access the database.