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 (https://developers.arcgis.com/python/api-reference/arcgis.raster.toc.html#arcgis.raster.ImageryLayer...). The documentation indicates that it should return a boolean indicating success or failure, but all I get is the JSON for the service. For example, if I run this:
then I get the JSON, and nothing is changed.
If I go into the server administrator and then edit the JSON manually by adding exportTilesAllowed and maxExportTilesCount then it works fine.
The server version is 10.9.1 and ArcGIS Pro 2.9.2. The procedure is as follows:
Other than the offline use, this procedure works fine. The basemap is updated to use the new imagery, but our users can't use it offline unless I manually enable it.