AnsweredAssumed Answered

Overwriting several ArcGIS Online layers with python?

Question asked by unica360_adm on Oct 7, 2016
Latest reply on Oct 10, 2016 by unica360_adm

How can I update my layers in ArcGIS Online using Python?

From the platform I can upload one to one by overwrite tool. However, I'd like to know if there is some way by python to automate this task. At first, I've tried to update a shapefile in this way, but I want to update several shapefiles:

from arcgis.gis import *gis = GIS("url", "username", "password")data = "C:\\xc\\Data\SDs\\states_21basic.zip"shpfile = gis.content.add({}, data)

and then to publish it:

shpfile.publish()

Outcomes