I'm using the process outlined here: FeatureSharingDraft—Sharing module | ArcGIS Desktop and am getting an error that the layer already exists. ExecuteError: ERROR 001398: Service name 'WolfTelemetryDataOnline' already exists.
Failed to execute (UploadServiceDefinition).
I've tried adding in this parameter, but it still fails: arcpy.env.overwrite_existing_service = True
Is there a way to overwrite a hosted feature service from arcpy, or should I stick to using the Python API for this using sdItem.publish(overwrite = True)?
There is a code sample at the bottom of this doc that should overwrite a service:
Here's the updated link: https://desktop.arcgis.com/en/arcmap/latest/tools/server-toolbox/stage-service.htm
Also, for anyone here looking for the Pro help doc page:
https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/featuresharingdraft-class.htm