I want to automate the process of updating my hosted feature layers using arcpy

229
2
07-24-2018 01:24 PM
vonmoosa
MVP

Does anyone have a sample script I can modify for my own use? I currently open a mxd with the layers in my table of contents and overwrite the features that way.

0 Kudos
2 Replies
JonathanQuinn
Esri Frequent Contributor

There's a blog on how to do this with Pro:

https://www.esri.com/arcgis-blog/products/api-python/analytics/updating-your-hosted-feature-services... 

Which is built on using Python API, so you can look at that for functions you can use:

arcgis.gis module — arcgis 1.4.2 documentation 

The publish item function has an "overwrite" parameter that can be used:

Publish Item—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers 

vonmoosa
MVP

I ended up using a script I found on GitHub to accomplish this. Thanks for your help.

0 Kudos