AnsweredAssumed Answered

Using python in ArcGIS Pro to upload a map service to ArcGIS for Server or Portal  

Question asked by H.Bouckaert_westernpower on Jul 1, 2018
Latest reply on Jul 2, 2018 by wroe



It looks to me that if you only have ArcGIS Pro on your desktop, you can no longer upload a map service to ArcGIS Server. The options for publishing to Portal for ArcGIS are also limited. 


Firstly if you want to load and configure a map manually in ArcGIS Pro you can only publish to Portal or to ArcGIS Online, because in ArcGIS Pro you cannot make a direct connection to ArcGIS for Server any more.


If you want to publish a map using python, the old arcpy.mapping.CreateMapSDDraft in ArcMap is now replaced by However, firstly you have to access a Project from python (use to set up your environment) which in a shared setup you may not want to do. Secondly CreateWebLayerSDDraft only allows you to publish to ArcGIS Online, i.e. you cannot even create an sddraft that is configured to publish to your own internal Portal. Strange!


So the first question is, how are people going to publish to ArcGIS for Server if they only have ArcGIS Pro on their desktop?  In ArcGIS Pro, you cannot connect to ArcGIS for Server for "manual" publishing from a map, and neither can you connect to  ArcGIS for Server with to use python for publishing. I had a look at the arcpy.sharing functionality, but there also, publishing is limited to Portal or ArcGIS Online. Is this an oversight?     


Now imagine I forget about publishing to ArcGIS for Server, it seems I am also limited in publishing to Portal. Say I want to use python in ArcGIS Pro to publish a map tile service directly to Portal for ArcGIS. This cannot be done because creating an SDDraft in python can only connect to ArcGIS Online. I have tried all options, but to me it looks like this is no longer possible. So in ArcGIS Pro my options are limited as follows:


1. Use python: can only publish to ArcGIS Online

2. Manually publishing from a map: can publish to Portal and ArcGIS Online (but I want to automate things)

3. Publishing to ArcGIS for Server: not possible manually or with python.   


Is this true? If my aim is to automate things and publish using python to Portal or ArcGIS Server, is there any way around this?