normalize the apiUrl being set