support name option of get_hosts api