Save a service definition for a web layer

With ArcGIS Pro, you can save service definitions for web layers to be shared to a portal at a later time. A service definition file (.sd) contains information about the web layer's type, properties, and capabilities. See Introduction to saving service definitions to learn more about how service definitions can be used in your organization's sharing workflows.

You can save a service definition for a web feature layer, web tile layer, or map image layer with a specific connection or without a connection when offline or disconnected from the server.

Service definitions cannot be created for vector tile layers, web scene layers, web imagery layers, or web elevation layers.

Save a connected service definition for a web layer

A connected service definition is configured for a specific server connection. The option to save a service definition is available in the Share As Web Layer and Overwrite Web Layer panes when you are connected to ArcGIS Online or ArcGIS Enterprise. In either pane, click the Publish drop-down arrow and click Save As SD to save a service definition file.

The workflow to save a service definition for web layers is similar to sharing or overwriting web layers and is not discussed in detail here. See the following topics for more information:

Save an offline service definition for a web layer

An offline service definition is connection neutral; it is not configured for a specific server connection. You can save an offline service definition if you are offline or not connected to the server. This workflow explains how to save an offline service definition for a web layer with default settings to be later shared to a portal. To change the default configuration, see the following:

You can also use ArcPy to save an offline service definition. To learn more, see Introduction to arcpy.sharing.

To save a service definition for a web layer in a disconnected environment, complete the following steps:

  1. Do one of the following:
    • Share all usable layers in the map in the service definition.
      • On the Share tab, in the Share As group, click the Web Layer drop-down arrow and click Save As Offline Service Definition Service Definition.
      • Right-click the name of the map in the Contents pane, point to Save As Offline Service Definition, and click Web Layer on Portal Service Definition.
    • Share selected layers in the map in the service definition. Select the layers in the Contents pane. Right-click any selected layer, point to Sharing, and click Save As Offline Service Definition Service Definition.

    The Save As Offline Service Definition pane appears.

  2. Provide a name for the web layer.
  3. Complete the Summary and Tags fields.

    You can enter a maximum of 128 tags.

  4. Under Version, select the ArcGIS Enterprise version to which the service definition will be published. Specifying a version ensures the service definition contains content compatible with your server. Alternatively, select ArcGIS Online.
    Note:

    To verify the server version, sign in to ArcGIS Server Manager, browse to Site, and click Software Authorization. You can also access the Server Info at the following URL: https://<host>/<instance>/rest/info.

    Alternatively, contact your administrator for assistance.

    Tip:

    You can create multiple service definition files if you need to publish to portals with different versions.

  5. If you are saving the service definition for an ArcGIS Enterprise portal, under Data and Layer Type, select the layer type under the data type of your choice.

    If you are saving the service definition for ArcGIS Online, under Layer Type, select the layer type of your choice.

  6. Optionally, under Location, provide a name of an existing portal folder or a new folder.

    By default, the web layer is stored at the root level of the portal content.

  7. Optionally, for Server Folder, provide a name of an existing server folder or a new folder.

    By default, the service is stored in the root folder of the server.

    Note:

    The Server Folder option only appears if you are sharing a map image layer.

  8. Optionally, click the Content tab to view the folder, new web layers, and sublayers with assigned IDs if available.

    If you enabled the Allow assignment of unique numeric IDs for sharing web layers option on the Map Properties dialog box, assigned IDs appear for each sublayer. To change an ID, click the number next to the layer or table. On the Layer Properties or Standalone Table Properties dialog box, on the General tab, type a custom integer ID in the Layer ID or Table ID text box. For more information, see Assign layer IDs.

  9. Under Finish Staging, click Analyze Identify potential performance bottlenecks and errors to review for problems.

    Errors and warnings are listed on the Messages tab. Right-click a message to open its help topic or take corrective action in the software. Errors Error must be resolved before you can save the service definition. Resolving warnings Warning is recommended but not required.

    Learn more about analyzing GIS resources

  10. After you have resolved errors, and optionally resolved warnings, click Save.

    The Save As Service Definition File dialog box appears.

  11. On the dialog box, specify the location and name of the service definition file, and click Save.
  12. Optionally, click Jobs Open Job Status Pane to monitor the job status.
  13. Once the service definition has been successfully staged, click the Manage the service definition link at the bottom of the pane to open the location of the service definition file.

Save an offline service definition that overwrites a web layer

To create an offline service definition that overwrites an existing web feature layer or map image layer, complete the following steps:

  1. At the top of the Save As Offline Service Definition pane, click the Configuration tab and click the Configure Parameters tab Configure parameters below it.
  2. Under Settings, check the Overwrite existing web layer check box.

    Checking this box sets the service definition to overwrite a web layer. If the service name exists on the server, publishing the service definition will overwrite the existing web layer. If the service name doesn't exist, a new web layer will be shared.

    Caution:

    Publishing a service definition staged to overwrite will automatically replace the existing web layer if found on the server. To avoid unintentionally overwriting existing web layers and their associated data, store these service definitions in a way that makes them distinguishable from other service definitions.

If you are ready to publish your web layer to ArcGIS Online or an ArcGIS Enterprise portal, see Publish a service definition.

Related topics