Is it possible to use the Python API to update the basemap layers of an existing web map to those of another web map?
For example, I have a template web map that has the base map configured as desired, and I'd like to use the Python API to iterate over several existing web maps and update the base map using the template web map.
Below is the code I've tried, but doesn't seem to do anything to the target web map:
import arcgis
# set web map ids
wmIDTarget = '...id1...'
wmIDTemplate = '...id2...'
# connect to portal
p = arcgis.GIS('https://www.arcgis.com/', 'user_name', 'user_password')
# create web map items
wmItemTarget = arcgis.mapping.WebMap(p.content.get(wmIDTarget))
wmItemTemplate = arcgis.mapping.WebMap(p.content.get(wmIDTemplate))
# get template base map layer information
templateBase = wmItemTemplate.basemap.get('baseMapLayers')
# update target web map base map layers
wmItemTarget.basemap.update({'baseMapLayers':templateBase})
wmItemTarget.basemap.update({'title':'Basemap Updated'})