Hi!
I'm trying to list the feature layers shown in each map from every web application, dashboard, and storymap on my Enterprise Portal. Is there a way to retrieve all the map objects that belong to an app? Something like this, maybe?:
from arcgis.gis import GIS
from arcgis.mapping import WebMap
gis = GIS(url='https://myesriportal.org/portal', username='admin', password='PUT_PASSWORD_HERE')
webapp_items = gis.content.search(query=f"type:Web Mapping Application", max_items=10000)
webapp_items += gis.content.search(query=f"type:Dashboard", max_items=10000)
webapp_items += gis.content.search(query=f"type:StoryMap", max_items=10000)
#print the web app title, web map title, and layer name
for webapp_item in webapp_items:
for webmap_item in webapp_item.content.webmaps: # Does something like this exist?
webmap_obj = WebMap(webmap_item)
for layer in webmap_obj:
print(webapp_item.title, webmap_item.title, layer.title)Thanks in advance for any suggestions!