The Publishing toolset contains tools to stage, upload, and share web layers and services.
Tool | Description |
---|---|
Replaces the content of a web layer in a portal with the content of another web layer. | |
Stages a service definition. A staged service definition file (.sd) contains all the necessary information to share a web layer, web tool, or service. | |
Uploads and shares a web layer, web tool, or service to ArcGIS Online, ArcGIS Enterprise, or ArcGIS Server. |
Automate the sharing of web layers and services
You can automate the sharing of web layers and services using a combination of ArcPy functions and tools in the Publishing toolset. The workflow begins with a map that you want to share.
- First, create a service definition draft using the arcpy.sharing module or the CreateImageSDDraft, CreateGPSDDraft or CreateGeocodeSDDraft ArcPy functions.
- Next, stage the service definition. Staging takes the service definition draft and consolidates all the information needed to share the web layer or service into a complete service definition. Use the Stage Service tool to stage the service definition.
- Finally, use the Upload Service Definition tool to upload the service definition and publish the web layer or service.
You must sign in to ArcGIS Online, ArcGIS Enterprise, or ArcGIS Server to share your web layer or service with an account that has privileges to create content and publish.