read hostname for fetching from apiurl