Include Layer Settings in arcpy Publishing steps or provide a tool to "Create item JSON from CIM Layer"

281
1
09-12-2022 03:49 AM
Status: Open
Labels (1)
SimonSchütte_ct
Occasional Contributor III

At the moment, it is not possible to publish a layer with (referenced) data using arcpy to ArcGIS Enterprise, while maintaining the Layer configuration like PopUp Settings.

References:
https://gis.stackexchange.com/questions/361345/how-can-i-get-a-configured-pop-up-in-arcgis-pro-to-pu...

https://community.esri.com/t5/arcgis-enterprise-questions/pop-up-created-in-pro-does-not-work-when-p...

https://community.esri.com/t5/arcgis-pro-questions/popup-information-not-published-to-arcgis/td-p/11...

https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-configure-map-image-layer-pop-u...


The "Share As" tools are not exposed as their own tools and can not be used in arcpy or in model builder, as explained here: https://community.esri.com/t5/modelbuilder-questions/quot-overwrite-web-layer-quot-tool-in-model/td-... (No, Replace Web Layer does not help, as it does not support all Layer types)

The arcpy scripts (that can be found online) at the moment only allow to create and publish sddraft/sd files and do not include the popup information. In the Upload Service Definition Stage this important information is dismissed: see https://community.esri.com/t5/arcgis-pro-questions/popup-information-not-published-to-arcgis/td-p/11...

Possible solutions:

For automated workflows, it is important to be able to share Layers the same way a ArcGIS Pro does.
(We need arcpy access to the same steps, that the Share As tools perform in the background)

If it is not possible to expose the "Share As" tools as individual Geoprocessing tools (which would be great),
please fix the Publishing Bug that avoids the missing Layer information when publishing using arcpy.

Alternatively provide a tool that can generate the Layer-Information from the CIM Layer into the JSON Format used by the item JSON in Portal. Then we could publish the service using an SD file and update the item JSON with the popup information exported from the ArcGIS Pro project, all directly from within arcpy.

Bug: https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzOTI1Mw==

1 Comment
SimonSchütte_ct

Just as reference:
A similar Idea describing the underlying issue of not being able to use the publishing tools from the UI in Modelbuilder / ArcPy can be found here https://community.esri.com/t5/arcgis-pro-ideas/ability-to-overwrite-hosted-feature-layer-within/

The Blog article (https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-mod...) offers a partial solution only, as the publishing tools currently available in arcpy are not feature equivalent to the ArcGIS Pro UI Tools.

There is a need to conveniently automate the publishing processes using arcpy with the same or feature equivalent tools to what we have in ArcGIS Pro.