Hi all,
I have a mapservice published on my Portal with ArcGIS Pro, and I want to get a service definition file from it (.sd) with a python script (the final goal is to have a sd that could be published to other Portal environments).
My environment : Arcgis Enterprise 10.6 (I can't upgrade to a new version) on a Linux OS.
With this documentation (The Python 3 runtime for ArcGIS Server on Linux—ArcGIS Server Administration (Linux) | ArcGIS Enterp... ), I installed python 3 environment, using particularly the following command :
conda install -c esri arcgis-server-10.6-py3
as 10.6 is my working version.
This environment is fully functional as I use ArcGIS API for Python.
I already succeeded in doing the job on a Windows os (on which arcpy come from an ArcGIS Pro 2.4.0) :
- I get mapx file in the published mapservice folder
- I create ArcGIS Pro project in which I import the mapx file
- I list maps in the ArcGIS Pro project, and I get a "service draft" with the "getweblayersharingdraft" method of Map object
- Then stage service to get the sd file.
But when I execute the same script on my Linux environment, I get an error : "'Map' object has no attribute 'getWebLayerSharingDraft'".
And it is true : I checked source code and arcpy module included in the arcgis-server-10.6-py3 package is older than my ArcGIS Pro 2.4 and it does not provide the "getWebLayerSharingDraft" method.
But it is present in the next version arcgis-server-10.6.1-py3 package.
I try to use it but my 10.6 licence seems to be not valid for that.
Do you have any solution to my problem ? Is there a way to use the 10.6.1 version in my 10.6 environment ?
Am I missing an other way to get the sd file ?
Thank you in advance for your help !