Allow changing of API url endpoint in initialization