runAPI for webapp