<?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 Set offline status in applicationProperties in web map object in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/set-offline-status-in-applicationproperties-in-web/m-p/1321946#M8953</link>
    <description>&lt;P&gt;I'd like to set the 'offline' object within the applicationProperties of a web map object when that object does not exist, using the python API.&amp;nbsp; I can update the applicationProperties object with the following code, which updates the object locally in the session, but I'd like to write the property back to the portal item.&lt;/P&gt;&lt;P&gt;For example, consider a web map with the following applicationProperties object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;"applicationProperties": {
	"viewing": {
		"routing": {
			"enabled": true
		},
		"basemapGallery": {
			"enabled": true
		},
		"measure": {
			"enabled": true
		}
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to add this object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;"offline": {
	"editableLayers": {
		"download": "features",
		"sync": "syncFeaturesUploadAttachments"
	},
	"readonlyLayers": {
		"downloadAttachments": false
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that the applicationProperties looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"applicationProperties": {
	"viewing": {
		"routing": {
			"enabled": true
		},
		"basemapGallery": {
			"enabled": true
		},
		"measure": {
			"enabled": true
		}
	},
	"offline": {
		"editableLayers": {
			"download": "features",
			"sync": "syncFeaturesUploadAttachments"
		},
		"readonlyLayers": {
			"downloadAttachments": false
		}
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can update the object locally with the following code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item = gis.content.get(item_id)
item_json = item.get_data()
app_props = item_json['applicationProperties']
if not 'offline' in app_props:
    off_line = json.loads('{"offline": {"editableLayers": {"download": "features", "sync": "syncFeaturesUploadAttachments"}, "readonlyLayers": {"downloadAttachments": false}}}')
    app_props.update(off_line)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... but I'd like to write/save the new applicationProperties config back to the web map portal item.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible with the python (or any) API?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 22:10:24 GMT</pubDate>
    <dc:creator>ChrisBeaudette</dc:creator>
    <dc:date>2023-08-23T22:10:24Z</dc:date>
    <item>
      <title>Set offline status in applicationProperties in web map object</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/set-offline-status-in-applicationproperties-in-web/m-p/1321946#M8953</link>
      <description>&lt;P&gt;I'd like to set the 'offline' object within the applicationProperties of a web map object when that object does not exist, using the python API.&amp;nbsp; I can update the applicationProperties object with the following code, which updates the object locally in the session, but I'd like to write the property back to the portal item.&lt;/P&gt;&lt;P&gt;For example, consider a web map with the following applicationProperties object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;"applicationProperties": {
	"viewing": {
		"routing": {
			"enabled": true
		},
		"basemapGallery": {
			"enabled": true
		},
		"measure": {
			"enabled": true
		}
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to add this object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;"offline": {
	"editableLayers": {
		"download": "features",
		"sync": "syncFeaturesUploadAttachments"
	},
	"readonlyLayers": {
		"downloadAttachments": false
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that the applicationProperties looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"applicationProperties": {
	"viewing": {
		"routing": {
			"enabled": true
		},
		"basemapGallery": {
			"enabled": true
		},
		"measure": {
			"enabled": true
		}
	},
	"offline": {
		"editableLayers": {
			"download": "features",
			"sync": "syncFeaturesUploadAttachments"
		},
		"readonlyLayers": {
			"downloadAttachments": false
		}
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can update the object locally with the following code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item = gis.content.get(item_id)
item_json = item.get_data()
app_props = item_json['applicationProperties']
if not 'offline' in app_props:
    off_line = json.loads('{"offline": {"editableLayers": {"download": "features", "sync": "syncFeaturesUploadAttachments"}, "readonlyLayers": {"downloadAttachments": false}}}')
    app_props.update(off_line)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... but I'd like to write/save the new applicationProperties config back to the web map portal item.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible with the python (or any) API?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 22:10:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/set-offline-status-in-applicationproperties-in-web/m-p/1321946#M8953</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2023-08-23T22:10:24Z</dc:date>
    </item>
  </channel>
</rss>

