The Publishing toolset provides tools to stage and share web layers. Sharing hosted web layers can be accomplished using ArcGIS Pro.
Automating the sharing of web layers can be accomplished by using a combination of ArcPy functions and the geoprocessing tools in the Publishing toolset. The workflow begins with a map that you want to share.
- First, use one of the arcpy functions CreateWebLayerSDDraft (in arcpy.mp), or CreateGPSDDraft to create a service definition draft.
- Next, stage the service definition. Staging takes the service definition draft and consolidates all the information needed to share the web layer into a complete service definition. Use the Stage Service geoprocessing tool to stage the service definition.
- Finally, use the Upload Service Definition geoprocessing tool to upload the service definition and publish the web layer.
You will need to sign in to ArcGIS Online or ArcGIS Enterprise in order to share your web layer with an account that has privileges to create content and publish.
Stages a service definition. A staged service definition (.sd) file contains all the necessary information needed to share a web layer.
Uploads and shares a hosted web layer to ArcGIS Online or ArcGIS Enterprise.