add #init method to initialize with API basepath