Swapping Out REST URLS & ITEM ID's in WebMap JSON Files?

1657
5
03-08-2021 02:37 PM
DS_GIS
by
New Contributor III

Hello,

I've been testing this workflow for a few weeks with unfortunately little success. We are amidst a migration effort from an unstable standalone ArcGIS Server to a new one. As much work can go into the creation of WebMaps & Dashboards, we are trying to ensure the migration is easier for users by maintaining configurations and just swapping out the services in the code. 

Basically, new services would be published and we would swap out the Item ID's and Rest URLS of the old services in the WebMap's JSON code for the new services. 

I first tested this workflow with a WebMap from ArcGIS Enterprise Portal to ArcGIS Online. I was able to bring the map through, with the new services, and symbology maintained. However, when the webmap was opened it always prompted for credentials to Enterprise. This webmap backed a high-level dashboard. So, we also found that when the new webmap item ID was swapped out in the dashboard code it would maintain the template, but none of the widget or graph configurations would persist. Despite all the feature layers with their data being present. 

Since certain aspects of the above were a success I set about testing this workflow exclusively within ArcGIS Enterprise. I created a copy of a webmap to test with, republished the services within to our new server, got into the JSON code and swapped out the REST URLS for the new services.

The Webmap pulls in the new services in the contents pane, I can open their attribute tables, and I can check that their service definitions open. But, the map frame remains empty and devoid of symbology. I don't even have an option to configure symbology under the content for any of the layers. As a sanity check, I opened a layer just individually on a new map and I can indeed configure the symbology.

I want to get this workflow to be a success, and I've scoured the internet, but I can't find any resources for this process. Does anyone know where I can look to better educate myself? Or, does anyone have any ideas as to what I could be missing?

0 Kudos
5 Replies
jcarlson
MVP Esteemed Contributor

Have you looked at AGO Assisstant? It's really fantastic for swapping out urls in web maps.

 

jcarlson_0-1615243940806.png

 

- Josh Carlson
Kendall County GIS
DS_GIS
by
New Contributor III

Hello Josh, 

Thank you very much for your response! I've actually been using AGO Assistant during this entire process. I copy the Webmap's JSON file and then I save it. I always keep the original JSON so I can revert back if edits to the code aren't a success. I then use the program Brackets to edit the code. Is this the workflow you mean using AGO Assistant? Or, is there something I missed?

Sincerely,
Danielle Sellers

0 Kudos
jcarlson
MVP Esteemed Contributor

Keeping backups are a good idea. That is essentially what I meant, yes, just swapping out the webmap JSON to reference to new layers. I didn't realize you were using AGO Assistant, and thought it would be helpful to you if you weren't.

Regarding the core problem in your post, I'm not sure where to look next, but I would guess there must be some difference between the source and destination layers. On the source layers, are there perhaps custom lists/domains, or field labels, or editing templates in place that get changed in the migration process?

I'm assuming the actual source of the data isn't changing, it's just the server where they're hosted?

- Josh Carlson
Kendall County GIS
0 Kudos
DS_GIS
by
New Contributor III

Oh yes, backups are a must! Thank you, that was a very good suggestion. 

You are correct. I've been wracking my brain for the potential differences and trying to deduct them. But, I imported the MXD's the services were originally published from directly into ArcPro. So, the layer remains the same, as does the feature class schema (domains, field labels). 

You are correct the source of the data has remained the same as well. All the layers are hosted in an SDE. The server is the only difference. That and the old layers were added to Enterprise Portal from this old standalone server by adding the Rest URL's directly to the map. This means that the layers don't have an ItemID line when you look at the JSON code on the backend. The new layers are published directly to Portal & our new federated server. So, they have ItemIDs. I've been considering adding an ItemID line into the JSON code to add these. But, I'm not certain that would be the ticket. 

I've been searching for guides to understand the JSON code behind the Esri webmaps. I thought that might provide me some insight. But, there are few resources I can find online. 

Sincerely,

Danielle Sellers

0 Kudos
DonHartfield
New Contributor

If you are interested in migrating / cloning content between ArcGIS environments, then please take a look at Backup My Org -- part of GEO Jobe's ABCs of GIS.

Backup My Org has the newest and most-powerful version of GEO Jobe's cloning workflow. I have attached the PDF of supported file types. What makes our cloning great is that it automatically rewires the dependencies as well as updates the json files for you as it resolves the migration.

What makes this solution amazing is that it not only does migration of data, but allows you to perform fully customizable Backups and Restores of your data from any ArcGIS environment whether ArcGIS Online or an Enterprise Portal.

Please reach out to connect@geo-jobe.com if you are looking for more information.

Best

0 Kudos