So you want to roll your own connection pooling?
Just keep in mind that your Rest API is supposed to be multi-thread, things will be "interesting" if you cache one connection object on module level and all calling threads try to reuse that connection. You can avoid with having a semaphore or similar device around your connection object. Which means that your parallel processes will be seriliased.
I may be misunderstanding what you are trying to do, but I think the answer is: Don't do it.