AnsweredAssumed Answered

Determine "enable sync" setting

Question asked by miczat on Feb 14, 2018
Latest reply on Feb 16, 2018 by miczat

Hello,

 

Is it possible using the ArcGIS API for python to determine the Enable sync status of a hosted feature layer on ArcGIS online?

 

i.e. this setting:


sync setting

 

I don't need to change it at this stage, just determine if it is checked or not.

 

In context, I intend to loop though all the layers of a web map looking for any layer that does not have sync enabled,  using something like this:

 

from arcgis.gis import GIS
from arcgis.mapping import WebMap

gis = GIS(url, username, password)

map_id = # the_unique_item_identifier would be here #
search_result=gis.content.search(map_id,max_items=1000)
item = search_result[0]
print("map title       = ", item.title)

theWebMap = WebMap(webmapitem=item)
layerCount = len(theWebMap.layers)
print("layer count = " + str(layerCount))

for layer in theWebMap.layers:
    print("type            = ", layer.layerType)
    print("title           = ", layer.title)
    print("id              = ", layer.id)

    # mystery bit - property?  custom function?
    print("syncStatus      = ", layer.?????)

 

Thanks 

Outcomes