added stage name in url and api code that follows