Select to view content in your preferred language

Overwriting existing service with UploadServiceDefinition_server

1321
1
04-30-2018 08:41 AM
SzymonPiskula1
Regular Contributor

Hello

Is there a way to overwrite an existing service using arcpy.UploadServiceDefinition_server method having just the SD file, regardless how the SD file has been generated?

I can see a sample

Upload Service Definition—Help | ArcGIS for Desktop 

which requires operating on the SDDRAFT, but what if I dont have access to it and all i have is the SD file which i know i want to use to overwrite (or create a new if not existing) service? It seems that currently it is the SD file setting that dominates the process and i dont have control over this.

Regards,

Szymon

0 Kudos
1 Reply
JakeSkinner
Esri Esteemed Contributor

Hi Szymon,

You will not need a .ssdraft file.  In the link you provided above that contains the samples you can simply comment out the arcpy.StageService_server function.  This function simply converts a .ssdraft to an .sd file.

0 Kudos