I am wondering what are the options for updating a hosted feature layer in AGOL. For context, I will be hosting point layer with about 500 features that will be updated nightly from a scheduled task. The initial publishing of the layer does not need to be programmatic, but the nightly update does.
I have been looking into using the REST API update/delete/create endpoints for doing these nightly updates.
My question is, are there any other options for performing these updates outside the REST API? I see there is also a Python API and Native SDKs. Are those libraries using the REST API under the hood?
Hi Joe Saltenberger
The ArcGIS API for Python does use the REST API under the hood. This blog goes into that in a little more depth: ArcGIS API for Python Core Concepts Part 1: Python, APIs, and REST
There are some good resources on using the Python API to accomplish the workflow here:
Hope this helps,
The following code works for me in order to update hosted feature layer (i.e., overwrite the data):
from arcgis.gis import GIS
source = GIS("http://yourorganization.maps.arcgis.com", "username", "password", verify_cert=False)
csv = source.content.get('a4e4587122354eb2847d461263e3ccb7')