Overwrite existing hosted feature service

2362
2
01-09-2019 11:52 AM
JulieMikolajczyk3
New Contributor III

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)?

2 Replies
by Anonymous User
Not applicable

There is a code sample at the bottom of this doc that should overwrite a service:

Stage Service—Help | ArcGIS for Desktop 

JaredPilbeam2
MVP Regular Contributor