Issue
Updating data sources used in an Experience Builder app using the ArcGIS API for Python is difficult. The app might have multiple web maps or feature layers as dependencies. And many widgets reference these web maps or layers and have to be updated individually. You can use:
exp = WebExperience(item="{my id}")
print(exp.datasources)
to see the datasources and statements like:
exp.datasources['dataSource_1']['itemId'] = "{some id}"
exp.datasources['widget_11_output']['schema']['fields'] = {fields dict}
to update your data sources.
But after updating the datasource used a widget, the widget no longer loads: "Data is inaccessible".
The configuration of the widget in the data.json of the experience still shows the old datasource, and the old fields. So you would need to collect the data.json, update it and save it again to also fix this.
Proposed change
I propose to have one place to view and update all dependencies, exposed through the ArcGIS API for Python. Updating datasources (including field names) here, will update them everywhere they are used in the experience.
Background
At the Esri Developer & Technology Summit 2026 the new arcgis.apps.dashboards module was announced. It features the possibility to get dependencies and update dependencies for a given dashboard. Updates are done throughout in dashboard, in all components and even arcade expressions. Please add this functionality to the arcgis.apps.expbuilder as well.
Use cases
- Copy an existing experience and update the data sources used in the experience programmatically
- Fix a broken experience by updating a web map id, layer id, and/or field name