Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (7 sloc) 495 Bytes
#### Update map service urls in webmaps
from agoTools.utilities import Utilities
agoUtilities = Utilities(<username>) # Replace <username> with your username.
webmapId = '<WEBMAP ID>' # Replace with web map ID
oldUrl = '<http://myserver.com/arcgis/rest/services/old/MapServer>' # Replace with old map service URL
newUrl = '<http://myserver.com/arcgis/rest/services/new/MapServer>' # Replace with new map service URL
agoUtilities.updateWebmapService(webmapId, oldUrl, newUrl)