Hello,
I am trying to automate publishing of geoprocessing tool via ArcGIS API for Python. For this I have created a very simple tool which takes a string and returns it with Hello prefix. Created a tool in ArcGIS Pro and also have the SD file of the same.
How can I publish it to Portal with ArcGIS API for Python?
My ArcGIS environment is Portal for ArcGIS, federated ArcGIS Server (Hosting role), Web adaptor. All are version 10.8.1
While searching on the topic I came across with a solution using
arcpy.server.UploadServiceDefinition
document link
This method is throwing error "arcgisscripting.ExecuteError: ERROR 160203: Failed to load a resource (string, icon, bitmap, etc)
Failed to execute (UploadServiceDefinition)."
Any help would be appreciated. My goal is to publish and check the GP tool is working and then remove it since it is a test only.
Thanks