AnsweredAssumed Answered

Unable to add service to Portal folder

Question asked by epfirman on Jun 11, 2018
Latest reply on Jun 18, 2018 by epfirman

I am trying to add a map service to my Portal with the ArcGIS API for Python. It works fine if I add it to the root folder but if I try to add it to a different folder it says "User folder does not exist". Obviously it exists because I just created it 2 lines earlier. I am able to do this from the Portal manager, just not from Python. Any idea what I am doing wrong?


from arcgis.gis import GIS
gis = GIS("myportal", "myaccount")
content = gis.content
content.create_folder('Basin', owner='myaccount')
properties = {
'type':'Map Service',
item = content.add(item_properties=properties, owner='myaccount', folder='Basin')