apiUrl is not a function