Hi everybody,
Can we replace a map service that was published on portal using MXD by an APRX project? I mean, when the same MXD is imported to an APRX, can we "Overwrite" the map service on Portal?
I recommend the Python API. Recently we conducted an inventory of everything in our Portal. I was able to use the Python API to cycle through all of our Web Maps and output list of Layers with data sources.
Here are few lines to get you started. It isn't everything you need in the code but those are the main parts.
gis = GIS(url="PORTAL URL HERE", username="USERNAME", password="PASSWORD") webmap_search = gis.content.search(query="", item_type="Web Map", max_items=10000) for webmap_item in webmap_search: print({webmap_item.title}) webmap = arcgis.mapping.WebMap(webmap_item) for layer in webmap.layers: print(f"- {layer.title if hasattr(layer, 'title') else 'Untitled Layer'}, {layer.url}")
We imported the mxd into a pro project, kept the same name for the service and then did an overwrite. I did that for over 200 services. Couldn't find any documentation about if that was best practice or not. We haven't had any issues. I'm curious how others will respond to your questions. Best of luck!
@cdickerson Thank you very much. Much appreciated. I will use this code to filter the web maps.
@cdickerson Thank you for your suggestions. We have a federated system, so, I am able to import the MXDs and replace the map service using APRX. The next challenge is to find out all the web maps/apps in the Portal that has that map service and configure their settings.
Hi,
We updated all of our projects from MXDs to APRXs a number of years ago just by importing the map in to the Pro Project. If you have a federated system, new services will have a reference that will appear in Portal. If you have old services that were published before having an Enterprise Portal setup and federated with ArcServer you will need to add your services to your Portal first. Believe this can be accomplished by taking your REST endpoint URL and adding a layer in Portal. This creates the link in Portal that will allow you to overwrite your service from Pro.
@ShariF Sounds good. Thank you very much once again. I have not used Arcgis Online assistant, but I will try and see how it goes !!
Good question. I don't recall having to do what you are describing in this position but I do recall having to do that at my previous job. We have arcserver for both Portal and AGOL from which I overwrote the services. Our portal is old (10.7).
I was new to this organization and tasked to republish all services as they were pointing to a defunct geodatabase for both Portal and AGOL. Because of the urgency of needing to point to updated geodatabase, I only did a cursory review of the web maps/pop-ups . On that note too what I've since seen is hardly any pop-ups were configured (these are things I've been tasked to update/improve as I was hired - default pop-ups are my pet peeve!).
Redoing pop-ups is such a pain. I wonder if the ArcGIS Online Assistant would help? You can update item URL for the layers in a web map.
HI@DEWright_CA . Did you have to add the published layer and reconfigure (pop ups etc) it on different Web Maps? Or did it get replaced on webs maps by its own?
Hi @ShariF I am able to replace the map service on Portal via APRX. However, will this not replace them on web maps that they are in? I am having to replace them on the web maps manually and have to configure the popups again as it didnot honor the previous settings. Is this what you did? if not then, could it be a version issue? I am using version 10.8.1
I was not able to replicate your workflow by just overwriting an ArcMap mapservice with a Pro mapservice even though that would have been ideal. I needed to delete the ArcMap mapservice and then publish a new mapservice with the same name from Pro.
@DEWright_CA Awesome. Thank you!
The Mapservices were in Server; but referenced in WebMaps on Portal; and that worked just fine.
@ShariF @DEWright_CA were the map service on Portal or Server? Thanks both for sharing
I did the same thing; and it worked out pretty well. Only minor issues in some places with large services with Tile-Caches behind them; but overall worked out well.
You have to replace the service from ArcGIS Pro; you can't just drag/drop a APRX over the MXD; you have to publish/replace the service.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.