<?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 edit_tile_service doesn't work and returns JSON instead of boolean in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/edit-tile-service-doesn-t-work-and-returns-json/m-p/1172529#M7383</link>
    <description>&lt;P&gt;I am trying to automatically switch one of our basemaps to be available for offline use by setting the appropriate flags in edit_tile_service (&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.raster.toc.html#arcgis.raster.ImageryLayerCacheManager.edit_tile_service" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.raster.toc.html#arcgis.raster.ImageryLayerCacheManager.edit_tile_service&lt;/A&gt;).&amp;nbsp; The documentation indicates that it should return a boolean indicating success or failure, but all I get is the JSON for the service.&amp;nbsp; For example, if I run this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;myImageryLayer.edit_tile_service(&lt;SPAN&gt;max_export_tile_count&lt;/SPAN&gt;=&lt;SPAN&gt;99999&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;then I get the JSON, and nothing is changed.&lt;/P&gt;&lt;P&gt;If I go into the server administrator and then edit the JSON manually by adding&amp;nbsp;exportTilesAllowed and&amp;nbsp;maxExportTilesCount then it works fine.&lt;/P&gt;&lt;P&gt;The server version is 10.9.1 and ArcGIS Pro 2.9.2.&amp;nbsp; The procedure is as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Publish tpkx to portal using&amp;nbsp;arcpy.SharePackage_management&lt;/LI&gt;&lt;LI&gt;Use this published service to replace the existing basemap service using&amp;nbsp;arcpy.ReplaceWebLayer_server&lt;/LI&gt;&lt;LI&gt;Enable the basemap for offline use using&amp;nbsp;myImageryLayer.edit_tile_service(export_tiles_allowed=True, max_export_tile_count=99999)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Other than the offline use, this procedure works fine.&amp;nbsp; The basemap is updated to use the new imagery, but our users can't use it offline unless I manually enable it.&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2022 18:29:02 GMT</pubDate>
    <dc:creator>CameronMcKee1</dc:creator>
    <dc:date>2022-05-10T18:29:02Z</dc:date>
    <item>
      <title>edit_tile_service doesn't work and returns JSON instead of boolean</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/edit-tile-service-doesn-t-work-and-returns-json/m-p/1172529#M7383</link>
      <description>&lt;P&gt;I am trying to automatically switch one of our basemaps to be available for offline use by setting the appropriate flags in edit_tile_service (&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.raster.toc.html#arcgis.raster.ImageryLayerCacheManager.edit_tile_service" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.raster.toc.html#arcgis.raster.ImageryLayerCacheManager.edit_tile_service&lt;/A&gt;).&amp;nbsp; The documentation indicates that it should return a boolean indicating success or failure, but all I get is the JSON for the service.&amp;nbsp; For example, if I run this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;myImageryLayer.edit_tile_service(&lt;SPAN&gt;max_export_tile_count&lt;/SPAN&gt;=&lt;SPAN&gt;99999&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;then I get the JSON, and nothing is changed.&lt;/P&gt;&lt;P&gt;If I go into the server administrator and then edit the JSON manually by adding&amp;nbsp;exportTilesAllowed and&amp;nbsp;maxExportTilesCount then it works fine.&lt;/P&gt;&lt;P&gt;The server version is 10.9.1 and ArcGIS Pro 2.9.2.&amp;nbsp; The procedure is as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Publish tpkx to portal using&amp;nbsp;arcpy.SharePackage_management&lt;/LI&gt;&lt;LI&gt;Use this published service to replace the existing basemap service using&amp;nbsp;arcpy.ReplaceWebLayer_server&lt;/LI&gt;&lt;LI&gt;Enable the basemap for offline use using&amp;nbsp;myImageryLayer.edit_tile_service(export_tiles_allowed=True, max_export_tile_count=99999)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Other than the offline use, this procedure works fine.&amp;nbsp; The basemap is updated to use the new imagery, but our users can't use it offline unless I manually enable it.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 18:29:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/edit-tile-service-doesn-t-work-and-returns-json/m-p/1172529#M7383</guid>
      <dc:creator>CameronMcKee1</dc:creator>
      <dc:date>2022-05-10T18:29:02Z</dc:date>
    </item>
  </channel>
</rss>

