Add pagination to getallhosts