switch endpoint url