Added api version handling