Is there an option to do this using the ArcGIS API for Python?
Sure thing, try this out :
#Road Infrastructures print('Enabling Editing, Sync, Create, Delete, Query, Update and ChangeTracking') item_to_search = 'XXXXXXXX') owner = 'XXXXX' item = gis.content.search(query="title:" + item_to_search + " AND owner: " + owner, item_type="Feature Layer", sort_field='title', sort_order='asc') flc = FeatureLayerCollection.fromitem(item[0]) print("Road Infrastructures Initial Capabilities ==> {}".format(flc.properties.capabilities)) print("Road Infrastructures Initial Layer capabilities ==> {}".format(flc.layers[0].properties.capabilities)) print(' ') print('Updating Editing options ...') flc.manager.update_definition({'capabilities' : 'Query,Sync'}) layer = flc.layers[0] layer.manager.update_definition({'capabilities' : 'Query,Sync'}) #Check results # item = gis.content.search(query="title:" + item_to_search + " AND owner: " + owner, item_type="Feature Layer", sort_field='title', sort_order='asc') # flc = FeatureLayerCollection.fromitem(item[0]) print("Road Infrastructures Updated Capabilities ==> {}".format(flc.properties.capabilities)) print("Road Infrastructures Updated Layer capabilities ==> {}".format(flc.layers[0].properties.capabilities)) print("=================================================================================================================")