Working on a larger problem here. And one suggestion there is to start working in the more modern NAX functions and not the older NA functions.
I can't seem to find any documentation on how to input the `in_network_dataset` from a portal URL which is how I'm assuming how my users are expected to access it instead of downloading the entire thing locally which seems like it is missing the entire point of being on Enterprise in the first place.
All the documentation here, is pointing to local file locations.
Assuming I'm having a fundamental misunderstanding but I can't figure out what I should be doing.
Solved! Go to Solution.
Network dataset layers are only for network datasets, not for portal services. To use a service URL as the network data source, just use the URL directly instead of trying to make it into a network dataset layer first.
arcpy.na.MakeClosestFacilityAnalysisLayer("https://myportal.mydomain.com/portal/")
or
arcpy.nax.ClosetFacility("https://myportal.mydomain.com/portal/")
Network dataset layers are only for network datasets, not for portal services. To use a service URL as the network data source, just use the URL directly instead of trying to make it into a network dataset layer first.
arcpy.na.MakeClosestFacilityAnalysisLayer("https://myportal.mydomain.com/portal/")
or
arcpy.nax.ClosetFacility("https://myportal.mydomain.com/portal/")