setup rest api for connections