reconnects the api endpoints