My organization is planning to add web adaptors to our Enterprise servers and to delete the old/existing web adaptors. We have a Production and UAT Portal with hundreds of items in addition to almost a dozen different servers each of which will be having a web adaptor change.
Does anyone have any recommendations on ways to automate that process through Python or example codes that have done something similar? I don't want to have to manually edit hundreds of feature layers, web maps, and web apps. I assume the web app JSONs will need to be manually updated but there are a lot less web apps than there are feature layers.
You want the ArcGIS Online Assistant, it was made for this sort of thing.
Click either "Update the URLs..." under "I want to...", then select an item from the list at the left. You'll be presented with a simple find/replace dialog.
Edit: you could also do this with the Python API, but that probably depends on how many maps/apps you need to re-point to the new source. Once your find/replace text is written, you'd only need to click "Replace" once per map/app, so up to a point, I think it would be faster than figuring out the code.