Enable Service Configuration within PortalDatastore.publish_layers()

519
1
03-16-2023 05:17 PM
feralcatcolonist
New Contributor III

The ability to "Bulk Publish" items from a datastore is one of the more exciting developments to come out of ArcGIS Portal and the new ArcGIS Enterprise deployment methodology. This allows an organization to reduce the number of bespoke services they publish and instead rely on an automated system of publishing services that allows new schema changes to be synced at the push of a button.

 

For those of us that do not like pushing buttons, this new capability comes with a significant flaw. The corresponding action within the ArcGIS API for Python PortalDatastore.publish_layers(), does not honor service configuration templates that include changes to the basic capabilities including edit privileges or syncing. It is only possible to "bulk publish" a vanilla map and feature service without additional capabilities; these must be configured utilizing the ArcGIS Server Manager GUI or after the services are published programmatically edit the capabilities (https://developers.arcgis.com/python/guide/updating-feature-layer-properties)

 

Ideally, the idea would be to allow the publish_layers() function to honor the full service configuration template. At a minimum, options to enable edit and sync would be a welcome enhancement. For end users, the defaults of the template would need to be documented to clarify which parameters would need to be changed for a given configuration to be successful.

This Github issue covers the current state of affairs: https://github.com/Esri/arcgis-python-api/issues/1483

1 Comment
feralcatcolonist

Here's the ArcGIS API for Python command:

https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis._impl._datastores....

And if you've never bulk published before it's pretty great:

https://enterprise.arcgis.com/en/portal/latest/use/bulk-publish-arcgis-server-feature-layers.htm

And here's a video from Esri Canada that does a better job of explaining what it is and how to use it:

https://youtu.be/aBhr2pFtffw