Updating API to allow passing base URL instead of using predefined
constants