You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
arcpy will pull metadata down from at least a subset of ArcGIS server services, and then the arcgis API for Python can export it from services that have portal in front of them, but we need the item ID. So, a rough workflow:
Detect that we have a server-based dataset and parse the URL
Parse the URL - if it already has the item ID in it, extract it
If it doesn't, then load the page as an ArcGIS Server page and see if it has the item ID in the text - items from portal will. Parse it out
Servers without portal won't have an itemID there, so we'll fall back to arcpy (below).
Proceed as normal.
On close, detect it's server-based and upload it using ArcGIS API for Python.
If any of that fails, fall back to arcpy and it'll be read only. Right now we're relying on an arcpy flag to detect that it's read only, but that may not exist if we use the arcgis API for Python instead.
We may also want to allow people to use an itemid kwarg to ensure that pathway is taken.
The text was updated successfully, but these errors were encountered:
Holding a code snippet here that we'll need to expand on later:
server_info=urllib.parse.urlparse(self.dataset)
netloc="arcgis.com"if"arcgis.com"inserver_info.netlocelseserver_info.netloc# if we have subdomain of arcgis.com, just connect to the root URL. Otherwise, use the full domainserver_address=f"{server_info.scheme}://{netloc}"self._arcgis_connection=arcgis.gis.GIS(server_address)
self._arcgis_connection_item=self._arcgis_connection.content.get(server_info.path)
arcpy will pull metadata down from at least a subset of ArcGIS server services, and then the arcgis API for Python can export it from services that have portal in front of them, but we need the item ID. So, a rough workflow:
Proceed as normal.
The text was updated successfully, but these errors were encountered: