use common method to get public network id in addresses api
use _extract_name_from_url in all api code