HOW TO

Access branch versions of an ArcGIS Server service via the REST API

Last Published: June 14, 2024

Summary

In ArcGIS Enterprise, there is the option to publish a feature service with branch version capability. This allows you to create and manage different versions of data as you access the service.
ArcGIS Pro has a user interface that allows creating and managing versions within the application once you consume the feature service.

The steps provided below describe how to connect a named branch version via the REST API in your browser and via web maps on Portal for ArcGIS.

If you are using ArcGIS Experience Builder, there is an out-of-the-box widget that allows you to access branch versions and implement some branch versioned workflows. See: Branch Version Management widget—ArcGIS Experience Builder | Documentation 

Procedure

The following is an example of what the connection URL to a branch service looks like and what it consists of:

Example:
https://machine.domain.com/arcgis_server_web_adapter/rest/services/Feature_service_name/FeatureServer/0/?gdbversion=portaladmin.test_named_version

Construct the first part of the URL

  1. Publish a referenced feature service with branch version management capability.
  2. Obtain the URL at the ArcGIS Server REST endpoint., for example:
https://machine.domain.com/arcgis_server_web_adapter/rest/services/Feature_service_name/FeatureServer/0/

Construct the second part of the URL

  1. Go to the ArcGIS Server REST Endpoint.
  2. In the ArcGIS REST Services Directory, go to Home > Services, and select your feature service VersionManagementServer, as shown in the next image.

2024-01-23_10-22-04.jpg

  1. You will see the list of named branch versions available for the feature service.
  2. As shown in example in the documentation, it is required to have the version owner and version name included in the notation.

Examples:

  • gdbVersion=SDE.DEFAULT
  • gdbVersion=portaladmin.test_named_version
  1. Copy the version name to connect to:
    • In the example screenshot below, the owner and version name is: portaladmin.test_named_version
    • Owner = portaladmin
    • Version name = test_named_version

The second part of the URL should look like the following example:

?gdbversion=portaladmin.test_named_version

Example name of the branch version you will be connecting to

Combine the two parts of the URL so it resembles this example below:

https://machine.domain.com/arcgis_server_web_adapter/rest/services/Feature_service_name/FeatureServer/0/?gdbversion=portaladmin.test_named_version

Test connecting to the branch version by creating a web map in Portal for ArcGIS

  1. On your Portal for ArcGIS Home page, click Map on the upper ribbon.
  2. Select Add layer to the web map via URL.
  3. Paste the URL from above to be added as a layer.
    • Note that the layer we connected to is a named branch version.
Caution:
This workflow is only designed for viewing data and not editing it. Editing this layer will result in the edits going to the DEFAULT version.

Article ID: 000031457

Software:
  • ArcGIS Pro
  • Portal for ArcGIS
  • ArcGIS Server

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options