<?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 Does using gis.content.search cause web maps to be viewed? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/does-using-gis-content-search-cause-web-maps-to-be/m-p/1409883#M9888</link>
    <description>&lt;P&gt;I have a python script that will pull each webmap from our ArcGIS Online account and tell me how many views it has.&lt;/P&gt;&lt;P&gt;The basics of the script are below but it seems to be adding views each time I run it. The script opens the JSON for each webmap and pulls the lastViewed and numViews fields.&amp;nbsp; Each time I run the script the lastViewed date is always today or yesterday for every webmap.&lt;/P&gt;&lt;P&gt;This doesn't seem right because I know some of our webmaps are years old and have only a handful of views. Is there a way around this? The code snippet below isn't the whole script but shows how I am getting the data so you can ignore the convert_unix_to_mm_dd_yyyy part.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;def find_feature_layers():
    
    username = "username"
    password = "password"
    
    # Create a GIS object to connect to ArcGIS Online
    gis = GIS("https://www.arcgis.com", username, password)

    data = []
    
    
    search_results = gis.content.search(query= '',item_type = 'Web Map', max_items = 1000) 
    
    #get info
    
    for item in search_results:
        last_viewed = convert_unix_to_mm_dd_yyyy(item.lastViewed)
        created = convert_unix_to_mm_dd_yyyy(item.created)
        modified = convert_unix_to_mm_dd_yyyy(item.modified)
        title = item.title
        numViewsStr = str(item.numViews)
        numViews = item.numViews
        data.append([last_viewed, title, numViews, created, modified])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2024 19:33:16 GMT</pubDate>
    <dc:creator>MAttiyeh</dc:creator>
    <dc:date>2024-04-15T19:33:16Z</dc:date>
    <item>
      <title>Does using gis.content.search cause web maps to be viewed?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/does-using-gis-content-search-cause-web-maps-to-be/m-p/1409883#M9888</link>
      <description>&lt;P&gt;I have a python script that will pull each webmap from our ArcGIS Online account and tell me how many views it has.&lt;/P&gt;&lt;P&gt;The basics of the script are below but it seems to be adding views each time I run it. The script opens the JSON for each webmap and pulls the lastViewed and numViews fields.&amp;nbsp; Each time I run the script the lastViewed date is always today or yesterday for every webmap.&lt;/P&gt;&lt;P&gt;This doesn't seem right because I know some of our webmaps are years old and have only a handful of views. Is there a way around this? The code snippet below isn't the whole script but shows how I am getting the data so you can ignore the convert_unix_to_mm_dd_yyyy part.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;def find_feature_layers():
    
    username = "username"
    password = "password"
    
    # Create a GIS object to connect to ArcGIS Online
    gis = GIS("https://www.arcgis.com", username, password)

    data = []
    
    
    search_results = gis.content.search(query= '',item_type = 'Web Map', max_items = 1000) 
    
    #get info
    
    for item in search_results:
        last_viewed = convert_unix_to_mm_dd_yyyy(item.lastViewed)
        created = convert_unix_to_mm_dd_yyyy(item.created)
        modified = convert_unix_to_mm_dd_yyyy(item.modified)
        title = item.title
        numViewsStr = str(item.numViews)
        numViews = item.numViews
        data.append([last_viewed, title, numViews, created, modified])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 19:33:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/does-using-gis-content-search-cause-web-maps-to-be/m-p/1409883#M9888</guid>
      <dc:creator>MAttiyeh</dc:creator>
      <dc:date>2024-04-15T19:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Does using gis.content.search cause web maps to be viewed?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/does-using-gis-content-search-cause-web-maps-to-be/m-p/1409970#M9889</link>
      <description>&lt;P&gt;Yes it does.&amp;nbsp; I have 3rd party software to cycle thru my org's portal and it does the same thing.&amp;nbsp; It makes us think the webmap is being used when the software is only hitting it like your script does.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 22:38:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/does-using-gis-content-search-cause-web-maps-to-be/m-p/1409970#M9889</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2024-04-15T22:38:50Z</dc:date>
    </item>
  </channel>
</rss>

