Fixed api path to avoid redundant redirection.