Arcpy - List of layers used in a dashboard

492
0
08-19-2020 12:31 PM
Michael_Knapp
New Contributor III

Hi Folks - 

I'm trying to get a list of the layers used in our organization's dashboard via Python.

I can get a list of the dashboard without a problem:

for item in gis.content.search(query="NOT owner:esri_livingatlas",item_type="Dashboard", max_items=maxItems):
row = (item.title,item.owner,item.access,item.id,site,pubdate)
print('Dashboard:',row)
dashCursor.insertRow(row)

dashID = item.id
dashTitle = item.title
dashOwner = item.owner

But am thrown off by the fact that I can't just modify the code that we've use to get layers from a web map:

imap = WebMap(item)
layer_list = wmo.definition['operationalLayers']
layer_list = imap.layers

Is there something analogous that we can use for Dashboards? Have looked through help docs, but nothing yet. 

Thanks!

Tags (2)
0 Kudos
0 Replies