update vs publish for service definitions   

682
4
01-22-2020 08:05 AM
SteveScott
New Contributor III

What is the difference between update and publish for service definitions in arcpy and AGOL?

Tags (3)
0 Kudos
4 Replies
AnttiKajanus
New Contributor III

I'm not sure if I got the correct context with this questions but I try to answer. 

You can publish a new service using .sd file or you can override existing services published from it. You can update the uploaded .sd file (stored as an item in the AGOL) before overriding services from it.

So for example you create .sd file using arcpy, then publish a service from it, which will also upload the .sd file to the ArcGIS online and makes a link between the .sd file and created service. After that you do changes to the service configuration, recreate the .sd file and update existing one, which was uploaded to the ArcGIS online earlier, and then override services created from the previous version with the new one.

SteveScott
New Contributor III

So if I use update my metadata (including tags, description, credits, etc) will persist?

0 Kudos
SteveScott
New Contributor III

When I do "update" only the service definition is updated. It does not update the Feature Layer.

0 Kudos
AnttiKajanus
New Contributor III

I think you have to publish uploaded .sd-file using over overwrite = True parameter.