Select to view content in your preferred language

Update ArcGIS Server Service URLs in ArcGIS Online

100
0
a week ago

Update ArcGIS Server Service URLs in ArcGIS Online

Numerous organizations utilize ArcGIS Server services within ArcGIS Online. These services play a crucial role in powering various web maps, applications, dashboards, and story maps. There may be a time when an organization needs to update the ArcGIS Server URL.  For example, an organization may need to change ags.domain.org to ags.domain.gov. Below are scripts that will iterate through an ArcGIS Online's organization and update the URLs in:

  • referenced services
  • Web Maps
  • Web AppBuilder applications
  • Instant Apps
  • Experience Builder applications
  • Dashboards
  • Story Maps

There are two scripts:

  • Update DNS for AGOL Content.py
  • Logger.py

The Logger.py performs the logging duties, and simply needs to reside in the same directory as the Update DNS for AGOL Content.py script.  A directory called logs will be created with an AGOL Content Update Log File.txt file when the script is executed.  Any content that was unable to be updated will be written to the log.

The Variables section of the script is the only portion that will need to be updated:

JakeSkinner_0-1749564629307.png
VariableDescription
usernameAGOL Administrator Username
passwordAGOL Administrator Password
oldDNSThe portion of the URL to replace
newDNSWhat to replace the URL with

 

Additional Notes:  I recommend testing on an in individual user first.  To do so, uncomment line 77 and specify the AGOL username.  

JakeSkinner_1-1749564967288.png

 

Attachments
Version history
Last update:
a week ago
Updated by:
Contributors