Connect pgwrapper to rest_server