<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcPy - Get list of layers used in an AGOL Dashboard in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/406182#M31970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hi Folks -&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I'm trying to get a list of the layers used in our organization's dashboard via Python.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I can get a list of the dashboard without a problem:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;for item in gis.content.search(query="NOT owner:esri_livingatlas",item_type="Dashboard", max_items=maxItems):&lt;BR /&gt;row = (item.title,item.owner,item.access,item.id,site,pubdate)&lt;BR /&gt;print('Dashboard:',row)&lt;BR /&gt;dashCursor.insertRow(row)&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;dashID = item.id&lt;BR /&gt;dashTitle = item.title&lt;BR /&gt;dashOwner = item.owner&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;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:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;imap = WebMap(item)&lt;BR /&gt;layer_list = wmo.definition['operationalLayers']&lt;BR /&gt;layer_list = imap.layers&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Is there something analogous that we can use for Dashboards? Have looked through help docs, but nothing yet.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2020 16:42:55 GMT</pubDate>
    <dc:creator>Michael_Knapp</dc:creator>
    <dc:date>2020-08-20T16:42:55Z</dc:date>
    <item>
      <title>ArcPy - Get list of layers used in an AGOL Dashboard</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/406182#M31970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hi Folks -&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I'm trying to get a list of the layers used in our organization's dashboard via Python.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I can get a list of the dashboard without a problem:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;for item in gis.content.search(query="NOT owner:esri_livingatlas",item_type="Dashboard", max_items=maxItems):&lt;BR /&gt;row = (item.title,item.owner,item.access,item.id,site,pubdate)&lt;BR /&gt;print('Dashboard:',row)&lt;BR /&gt;dashCursor.insertRow(row)&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;dashID = item.id&lt;BR /&gt;dashTitle = item.title&lt;BR /&gt;dashOwner = item.owner&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;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:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;imap = WebMap(item)&lt;BR /&gt;layer_list = wmo.definition['operationalLayers']&lt;BR /&gt;layer_list = imap.layers&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Is there something analogous that we can use for Dashboards? Have looked through help docs, but nothing yet.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2020 16:42:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/406182#M31970</guid>
      <dc:creator>Michael_Knapp</dc:creator>
      <dc:date>2020-08-20T16:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy - Get list of layers used in an AGOL Dashboard</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/406183#M31971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; text-decoration: none;"&gt;&lt;A href="https://community.esri.com/migrated-users/231523"&gt;Christina Miller&lt;/A&gt; I was trying to do the exact same thing as you when I found your post.&amp;nbsp; I’m just shocked ESRI doesn’t provide these kinds of reports out of the box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; text-decoration: none;"&gt;I spent many hours trying to figure out how to read the webmapID in a given app/dashboard with Python (which I could see in &lt;A href="https://ago-assistant.esri.com/"&gt;AGOL Assistant&lt;/A&gt;&amp;nbsp;JSON view).&amp;nbsp; Luckily, I eventually found the solution: See line &lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt; color: #005e95; background-color: #ffffff; text-decoration: none;"&gt;In [13]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; text-decoration: none;"&gt;&lt;A href="https://developers.arcgis.com/python/guide/cloning-content/"&gt;https://developers.arcgis.com/python/guide/cloning-content/&lt;/A&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; text-decoration: none;"&gt;Attached is the script I developed.&amp;nbsp; It searches your ArcGIS Online for any web apps and dashboards and will then list&amp;nbsp;each of those&amp;nbsp;items and its details, the webmap associated to it and its details, and then every layer in that map and it's URL.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2020 13:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/406183#M31971</guid>
      <dc:creator>Tom_Laue</dc:creator>
      <dc:date>2020-10-08T13:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy - Get list of layers used in an AGOL Dashboard</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/1154458#M64080</link>
      <description>&lt;P&gt;I've put in an ArcGIS Idea to make this kind of functionality out-of-the-box.&amp;nbsp; Please see the following URL and give it a kudos if you agree with it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-enterprise-ideas/search-content-by-arcgis-server-url/idi-p/1154026" target="_blank"&gt;https://community.esri.com/t5/arcgis-enterprise-ideas/search-content-by-arcgis-server-url/idi-p/1154026&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 18:39:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/1154458#M64080</guid>
      <dc:creator>RogerDunnGIS</dc:creator>
      <dc:date>2022-03-16T18:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy - Get list of layers used in an AGOL Dashboard</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/1639487#M74578</link>
      <description>&lt;P&gt;I am also amazed that these tools aren't available out of the box. This code is great, and does what I want, except that after a lot of trial and error I have discovered it only works on dashboards older than 2021 or so. After that you get&amp;nbsp;a key error on 'widgets'. Something must have changed over time. I don't know what the new search key would be.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 02:48:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-get-list-of-layers-used-in-an-agol-dashboard/m-p/1639487#M74578</guid>
      <dc:creator>NaomiKalman</dc:creator>
      <dc:date>2025-08-06T02:48:11Z</dc:date>
    </item>
  </channel>
</rss>

