<?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 Help downloading WebMaps/WebApps as JSON files in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/help-downloading-webmaps-webapps-as-json-files/m-p/1173182#M46003</link>
    <description>&lt;P&gt;HI All. I've been looking at a couple of backup tools in the ArcGIS Online Marketplace and whilst I'm happy that the one I've trialed does a pretty decent job of downloading all of our content to a local folder for backup purposes, my management want me to try scripting it in-house first.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm already download feature services as feature classes in GDB's on a daily basis to capture changes to data for restoration after accidental deletion, but I'd like to go a step further.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been looking at the ArcGIS API for Python site and tried the following script (to no avail). Can anyone point out how I might be able to download both WebMaps and WebApps as JSON files, so that if they ever get deleted, we could republish them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import gis 
from arcgis.gis import GIS
    
### Access the stored password with keyring and sign into the GIS      # https://community.esri.com/t5/arcgis-online-blog/connect-to-the-gis-in-python-scripts-without/ba-p/889867
import keyring
pw = keyring.get_password("ArcGISOnline", "Username")
gis = GIS("https://maps.arcgis.com", "username", pw)
print("Connected to the GIS")

item = gis.content.get('item_ID_here')
print (item)
item.get_data()
print (item)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supposedly the get_data() line will download the item (or it's content?) to the default temp folder, but I can't see anything appearing (%temp% in File Explorer).&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/managing-your-content/#downloading-your-items" target="_blank" rel="noopener"&gt;ArcGIS API for Python: Managing your content (downloading-your-items)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 07:08:20 GMT</pubDate>
    <dc:creator>LindsayRaabe_FPCWA</dc:creator>
    <dc:date>2022-05-12T07:08:20Z</dc:date>
    <item>
      <title>Help downloading WebMaps/WebApps as JSON files</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-downloading-webmaps-webapps-as-json-files/m-p/1173182#M46003</link>
      <description>&lt;P&gt;HI All. I've been looking at a couple of backup tools in the ArcGIS Online Marketplace and whilst I'm happy that the one I've trialed does a pretty decent job of downloading all of our content to a local folder for backup purposes, my management want me to try scripting it in-house first.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm already download feature services as feature classes in GDB's on a daily basis to capture changes to data for restoration after accidental deletion, but I'd like to go a step further.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been looking at the ArcGIS API for Python site and tried the following script (to no avail). Can anyone point out how I might be able to download both WebMaps and WebApps as JSON files, so that if they ever get deleted, we could republish them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import gis 
from arcgis.gis import GIS
    
### Access the stored password with keyring and sign into the GIS      # https://community.esri.com/t5/arcgis-online-blog/connect-to-the-gis-in-python-scripts-without/ba-p/889867
import keyring
pw = keyring.get_password("ArcGISOnline", "Username")
gis = GIS("https://maps.arcgis.com", "username", pw)
print("Connected to the GIS")

item = gis.content.get('item_ID_here')
print (item)
item.get_data()
print (item)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supposedly the get_data() line will download the item (or it's content?) to the default temp folder, but I can't see anything appearing (%temp% in File Explorer).&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/managing-your-content/#downloading-your-items" target="_blank" rel="noopener"&gt;ArcGIS API for Python: Managing your content (downloading-your-items)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 07:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-downloading-webmaps-webapps-as-json-files/m-p/1173182#M46003</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2022-05-12T07:08:20Z</dc:date>
    </item>
  </channel>
</rss>

