take version and host as parameters while creating Api