AnsweredAssumed Answered

Sharing Options for Python Map Image Layer Automation

Question asked by CooperKey on Mar 22, 2020
Latest reply on Mar 23, 2020 by CooperKey

Having been referred to the overwrite option for sharing a map image layer in python, I am wondering if there is an option to allow for sharing with a group or, within the organization or, with everyone.  In the documentation for the method, there does not seem to be a sharing parameter option.  I was thinking about a solution like where I search for the layer and then update the parameter was  available option if there is no method in the other sharing option.  However i cannot get this code to actually update that parameter.   Here is the code I am trying:



from arcgis.gis import GIS
portal = ""
user = "      "
password = "     "
service = "WebUpdate"
gis = GIS(portal, user, password)
print("Search for original SD on portal…")
search_results ="{} AND owner:{}".format(service, user), item_type="Map Image Layer")[0]
print("Found SD: {}, ID: {} ".format(search_results.title,
feature_layer_item = search_results[0]
print("Setting sharing options…")
print("Finished updating: {} – ID: {}".format(feature_layer_item.title,


Anything I can do to through code to change the sharing for a map image layer?