Update URL in all AGOL maps?

518
1
01-12-2023 11:22 AM
Labels (2)
LisaT
by
Occasional Contributor III

Hi, I feel like I must be missing something.  I am using a lot of public layers (USGS, HIFLD, etc), many of which the URL will periodically go out of date and change.  I need a way to update the URL.  There seems to be some tools created that are supposed to help with this, but I can't get them to work.  Here are my steps:

1) the layers have been added as layers in "My Organization" and therefore have an organization URL  (https://mycompany.maps.arcgis.com/)

I have tried:

2) click on the service and directly update the URL in the settings.

Outcome: this updates the URL, but when I look at the maps that are using the layer they all still have an error that says the layer cant be loaded.

And:

3) I tried to delete the organizational URL and re-created it.

4) with either 2 or 3 above, I then tried to open one of the maps where the layers were unavailable and went to "Settings" to attempt to use the “Update References” tool.  In both cases, I hit the button and the dropdown doesn’t show anything.  It finds no problem layers?

Am I using the tool incorrectly?  Is there some sort of setting that I need to set somewhere for this to work? 

My preference would be to change it in one place and have it change for the whole site (as in #2). My users have created hundreds of webmaps using these layers.  I cannot go in and click on every single webmap and fix them.  How do I do this?  Does the GeoJobe application work for this?  Is there a way to do it with REST or Python?  Should I be setting the layers up in a different way?

Thank you for your help!

Lisa

 

0 Kudos
1 Reply
ChristopherCounsell
MVP Regular Contributor

When you update the service URL pointing to the ArcGIS Server Feature Service on the Settings Tab of the ArcGIS Online Item, this change is not picked up in existing Maps and Apps. This is by design to prevent one layer modification from affecting potentially hundreds of maps. 

You may want to support this idea:

https://community.esri.com/t5/arcgis-online-ideas/enh-000108149-enhancement-allow-the-option-to/idi-...

You could also request technical support to attach your organization to ENH-000108149 to support it through your account in addition to the community.

To update layers in bulk you will need to update the WebMap JSON directly. Using a tool like the ArcGIS Online Assistant is likely the best approach. Other users have done so here:

https://community.esri.com/t5/arcgis-enterprise-questions/new-ags-mapservice-layers-not-showing-in-a...

There's a newer AGOL assistant here to consider:

https://assistant.esri-ps.com/signin

Also be conscious of if you are just updating the URL, or if the layers / layer configuration will change as well. You could update a map and then compare the json of the layers.

I'd recommend saving an impacted map as a copy and then testing the change there. The AGOL Assistants are powerful but not supported.