becoming public the getApiUrl method