<?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 Re: How to find a id for a web map object in arcgis Python API? in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216061#M1161</link>
    <description>&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;would this works for you:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;search_result = gis.content.search("*", item_type = "Web Map", max_items=2000) 

print(len(search_result))
t = len(search_result)

while i &amp;lt;t:
    print(i)
    print(search_result[0])
    print("        "+str(search_result[0]['title']) +"  "+ str(search_result[0].id) + " -- "+ str(len(search_result))) 
    search_result.pop(0)
    i+=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2022 14:23:31 GMT</pubDate>
    <dc:creator>DominicRobergeIADOT</dc:creator>
    <dc:date>2022-09-26T14:23:31Z</dc:date>
    <item>
      <title>How to find a id for a web map object in arcgis Python API?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216003#M1160</link>
      <description>&lt;P&gt;Hi, I am struggling with finding the id of a web map object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose I search web maps using contentManager.search('', item_type = 'Web Map'), how can I find ids of each web maps in the list?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 11:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216003#M1160</guid>
      <dc:creator>LeePark</dc:creator>
      <dc:date>2022-09-26T11:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a id for a web map object in arcgis Python API?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216061#M1161</link>
      <description>&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;would this works for you:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;search_result = gis.content.search("*", item_type = "Web Map", max_items=2000) 

print(len(search_result))
t = len(search_result)

while i &amp;lt;t:
    print(i)
    print(search_result[0])
    print("        "+str(search_result[0]['title']) +"  "+ str(search_result[0].id) + " -- "+ str(len(search_result))) 
    search_result.pop(0)
    i+=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 14:23:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216061#M1161</guid>
      <dc:creator>DominicRobergeIADOT</dc:creator>
      <dc:date>2022-09-26T14:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a id for a web map object in arcgis Python API?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216083#M1162</link>
      <description>&lt;P&gt;You could use &lt;STRONG&gt;advanced_search&lt;/STRONG&gt; to return a dict, then convert that to a DataFrame:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pandas.DataFrame(gis.content.advanced_search('type:map', max_items=-1, as_dict=True)['results'])&lt;/LI-CODE&gt;&lt;P&gt;The resulting frame has &lt;STRONG&gt;id &lt;/STRONG&gt;as one of its columns:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1664203668159.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52171i38867E52ECDA04A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1664203668159.png" alt="jcarlson_0-1664203668159.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you just wanted a list, though, you could use list comprehension together with the &lt;STRONG&gt;search&lt;/STRONG&gt; method:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;[f'{i.id} | {i.title}' for i in gis.content.search('', item_type='Web Map', max_items=-1)]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1664204063069.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52174iB03EC067C7EDD49E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1664204063069.png" alt="jcarlson_1-1664204063069.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 14:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/how-to-find-a-id-for-a-web-map-object-in-arcgis/m-p/1216083#M1162</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-09-26T14:54:14Z</dc:date>
    </item>
  </channel>
</rss>

