Hello,
Is there a way to publish with python a feature service that is not hosted (in my sde)?
Thank you.
Hi,
I did found a solution I don’t fully remember it now but I crated SD draft and before crating the SD itself I parse it with an xml library and changed the values so it will be a feature service from my SDE.
Its and old code that I did for a client so I don’t have it on my, but this was the idea, and it worked.
I don’t remember if it was for this part of the code but I use both of the python env in this script both python 3 and python 2, because off different capability that I needed. It was done with subprocess.
Good Day.
I am also looking to write a python script that will publish a feature layer (that does not contain '(hosted)' in its name-it behaves differently than a regular feature layer, and I cannot consume that feature layer from a third party software). I've only found documentation on using getWebLayerSharingDraft, exporting that draft using exportToSDDraft, staging that draft using StageService_server, then uploading using UploadServiceDefinition_server, but then it published a 'Feature_Layer (hosted)' and I cannot use that layer in a webmap. I cannot find the difference between a Feature Layer and a Feature Layer (hosted), nor how to create the former using an arcpy script.
(my ultimate goal is to feed into a script the feature classes I want, and have the script set symbology, enable Sync and editing, name the layers a specific name, publish 3 different feature layers, then bundle them into a web map, ready for consumption by a third party software-it has to have exact configurations, thus the need for a script that configures the map the same way every time).
Hello Xander,
Thanks for the answers, a follow-up question. I want to publish with python a service that will reffer to the data in the enterprise geodatabase, Pro can do that and when you do manually it does not upload an .sd file to the portal and does not write "feature layer (hosted)" in the type field of my content, it only write "feature layer".
How can I do the same thing (not uploading the .sd and not get the (hosted)) with python 3 or ArcGIS API for python.
Thank you again.
Also have a close look at the discussion related to this idea: https://community.esri.com/ideas/12258 . Especially the comments made by dlaw-esristaff
There are no plans for ArcGIS Pro to enable publishing to Server. See this link Questions and Answers | 2017 Esri User Conference
Is there a plan to allow publishing of services from ArcGIS Pro directly to ArcGIS Server?No. The introduction of ArcGIS Enterprise, which integrates Portal for ArcGIS, signifies a shift from the client-server pattern to a Web GIS pattern that takes full advantage of the geoinformation model. A key design concept of Web GIS systems – such as ArcGIS Online or ArcGIS Enterprise - is organizing a collection of items in a portal. Accessing this portal from any device, anywhere, at any time allows you to use, create, and share geographic information throughout your organization, the community, and openly on the web. This information includes items like maps, scenes, layers, analytics, and apps. ArcGIS Server on its own is not capable of integrating into this model without the additional capabilities and content management functionality provided through a portal. For many of today’s advanced GIS service types, including vector tile layers, feature layers, and more, the service by itself does not contain all the information used to style or describe the results. Instead some of this information is part of the corresponding portal item, which gives more flexibility for modifying or changing content on-the-fly instead of going through the full publishing workflow.ArcGIS Server is a crucial component of ArcGIS Enterprise and can be thought of as the engine behind the scenes, but it does not stand alone in the modern GIS.
Is there a plan to allow publishing of services from ArcGIS Pro directly to ArcGIS Server?
No. The introduction of ArcGIS Enterprise, which integrates Portal for ArcGIS, signifies a shift from the client-server pattern to a Web GIS pattern that takes full advantage of the geoinformation model. A key design concept of Web GIS systems – such as ArcGIS Online or ArcGIS Enterprise - is organizing a collection of items in a portal. Accessing this portal from any device, anywhere, at any time allows you to use, create, and share geographic information throughout your organization, the community, and openly on the web. This information includes items like maps, scenes, layers, analytics, and apps. ArcGIS Server on its own is not capable of integrating into this model without the additional capabilities and content management functionality provided through a portal. For many of today’s advanced GIS service types, including vector tile layers, feature layers, and more, the service by itself does not contain all the information used to style or describe the results. Instead some of this information is part of the corresponding portal item, which gives more flexibility for modifying or changing content on-the-fly instead of going through the full publishing workflow.
ArcGIS Server is a crucial component of ArcGIS Enterprise and can be thought of as the engine behind the scenes, but it does not stand alone in the modern GIS.
I am building a script in python 3 and plan to run it from pro, the script in his first part will publish serval hosted feature layer to portal 10.5.1 and that is o.k. I have 4 more layers the sit in one project and will publish as one service they are taken from our enterprise geodatabase inside Microsoft sql server.
I want to publish those layers as regular services for the server and not as hosted in the portal. But I couldn't find the way to do it from Arcpy for python 3 modules .
Not entirely sure how to interpret you question. When you mention "not hosted" I assumed that the data will not reside in the portal, but in the explanation below you state "not hosted (in my sde)". Can you clarify what your data source is (where does the data reside now) and where you want to publish the layer (ArcGIS Online or Portal)?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.