Reworked to use new /hosts API call.