Added a function to get the API URL for a given resource.