Open a new transaction and connection for each api call instead of passing in an open connection.