util api to check connectivity status