returns None if we can't connect to the API server