Switch to api endpoint