API for getting the network