Thank you, Robert.
I was hoping to see a URL similar to a MapService-URL.
The background is the following:
If I wanted to port a WebApp from one system to another (development to production), I could download the WebApp from development environment and upload it to the other system. But in order to make it work, I assume I would have to specify the WebMap.
Is there any solution to port a WebApp to another system?
I think you are not understanding how WAB works. Production vs Development server does not matter when it comes to the webmap that is used. The webmap is just a pointer on AGOL or your Portal to the map data. So both the production server and the development server can and will use the same exact webmap id.
Ok, but we have two fully different ArcGIS Portals. So if I create a webmap in the dev environment, it is not showing up in production environment... Also, the MapServices exists both on dev and production environment with different REST URLs.
So I guess my attempt should be to download the webmap as mxd, set the production data sources, add it to the production portal, get the new itemID, add the new itemID to the downloaded WebApp and then deploy it.I hope this can be done with arcgis.gis and arcpy Python code.
Or is there an easier way?
So does the production and development servers both have a webmap containing the same Data on then? If so then once you download the app from development then you just publish this app to production and swap the itemId to the production servers webmap id.
Yes, it is the same data, but the production webmap should be created automatically from the dev version. So I am looking for scripted solution, that downloads the dev webmap, sets new data sources and adds this wbemap as an item to the production Portal. Then I could get itemID (hopefully scripted too) and replace it in the web app (as you are pointing out).