<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Branch Versioning - Get changes in Default version before reconciling in ArcGIS Utility Network Questions</title>
    <link>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677513#M6329</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;has the right idea. You can retrieve the differences directly from the default version for any two arbitrary moments in time. This ability was added in 10.9 when we introduced the fromMoment parameter (&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/differences/" target="_blank"&gt;Differences | ArcGIS REST APIs | Esri Developer&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobertKrisher_0-1768314495366.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/146710i8B67C882338396E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobertKrisher_0-1768314495366.png" alt="RobertKrisher_0-1768314495366.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, I can see a few problems with the code he generated:&lt;/P&gt;&lt;P&gt;It is using the wrong operation to calculate the differences. The operation should be differences (plural) not difference (singular).&lt;/P&gt;&lt;P&gt;The second problem is that you must always reference the global id of the version. You cannot use the name of the version in the URL. This means you'll need to query the version management service to get the global id of the default version and use that in your URL.&lt;/P&gt;&lt;P&gt;I'm not 100% sure about the way the moment is being calculated either.&lt;/P&gt;&lt;P&gt;In terms of writing your own code, while you can write raw HTTPS requests to do this, there is an API available for this via the ArcGIS API for Python:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#version" target="_blank"&gt;https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#version&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jan 2026 14:29:36 GMT</pubDate>
    <dc:creator>RobertKrisher</dc:creator>
    <dc:date>2026-01-13T14:29:36Z</dc:date>
    <item>
      <title>Branch Versioning - Get changes in Default version before reconciling</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677287#M6327</link>
      <description>&lt;P&gt;There is a requirement to find the changes posted to default in GIS daily and send the changes to a Work Management System. We are working with Utility Network and using ArcGIS Pro 3.3.7. The UN is branch versioned and we are planning to write a python code to achieve this. We also planned to create a version under Default, find the difference between the Default and the new branch version, send the differences to WMS.&lt;/P&gt;&lt;P&gt;The version changes API only provides the changes in the branch version. Is there a way I can identify what has been changed in the Default (posted from other versions)?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2026 15:41:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677287#M6327</guid>
      <dc:creator>ManojGnanaseelan</dc:creator>
      <dc:date>2026-01-12T15:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Branch Versioning - Get changes in Default version before reconciling</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677390#M6328</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/783567"&gt;@ManojGnanaseelan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I don't think you can get changes between the default and the newly created branch for your requirement.&lt;BR /&gt;&lt;BR /&gt;You can try calculating moment-based differences by providing the timestamps.&lt;BR /&gt;For example, if you run today at 6 AM, you can get from yesterday's 6 AM to today's 6 AM.&lt;BR /&gt;current_moment = int(time.time() * 1000)&lt;BR /&gt;last_run_moment = current_moment - (24 * 60 * 60 * 1000)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import requests
import json
import time

# Configuration
portal_url = "https://yourserver.domain.com/portal"
fs_url = "https://yourserver.domain.com/server/rest/services/UtilityNetworkName/FeatureServer"
vms_url = f"{fs_url}/VersionManagementServer"

# Get Token (Ensure you use a service account with access)
token = "YOUR_TOKEN"

# Define your window (Unix Timestamps in milliseconds)
# Example: 24 hours ago until now
current_moment = int(time.time() * 1000)
last_run_moment = current_moment - (24 * 60 * 60 * 1000) 

# Call the 'difference' endpoint on the DEFAULT version
# Note: 'sde.DEFAULT' usually has a constant GUID or can be targeted by name
diff_url = f"{vms_url}/versions/sde.DEFAULT/difference"

params = {
    "f": "json",
    "token": token,
    "fromMoment": last_run_moment,
    "toMoment": current_moment,
    "layers": "[0,1,2,3]", # Array of Layer IDs in your UN Feature Service
    "resultType": "objectIds" # Can also use 'features' for full geometry/attributes
}

response = requests.get(diff_url, params=params)
diff_data = response.json()

# Process the results for your WMS
# diff_data will contain 'inserts', 'updates', and 'deletes' categorized by Layer ID&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I haven't tested this python code, but it should give you some idea. Please try and let me know.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2026 20:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677390#M6328</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-01-12T20:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Branch Versioning - Get changes in Default version before reconciling</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677513#M6329</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;has the right idea. You can retrieve the differences directly from the default version for any two arbitrary moments in time. This ability was added in 10.9 when we introduced the fromMoment parameter (&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/differences/" target="_blank"&gt;Differences | ArcGIS REST APIs | Esri Developer&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobertKrisher_0-1768314495366.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/146710i8B67C882338396E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobertKrisher_0-1768314495366.png" alt="RobertKrisher_0-1768314495366.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, I can see a few problems with the code he generated:&lt;/P&gt;&lt;P&gt;It is using the wrong operation to calculate the differences. The operation should be differences (plural) not difference (singular).&lt;/P&gt;&lt;P&gt;The second problem is that you must always reference the global id of the version. You cannot use the name of the version in the URL. This means you'll need to query the version management service to get the global id of the default version and use that in your URL.&lt;/P&gt;&lt;P&gt;I'm not 100% sure about the way the moment is being calculated either.&lt;/P&gt;&lt;P&gt;In terms of writing your own code, while you can write raw HTTPS requests to do this, there is an API available for this via the ArcGIS API for Python:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#version" target="_blank"&gt;https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#version&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 14:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677513#M6329</guid>
      <dc:creator>RobertKrisher</dc:creator>
      <dc:date>2026-01-13T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Branch Versioning - Get changes in Default version before reconciling</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677525#M6331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/138089"&gt;@RobertKrisher&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Good catch. Thanks for the clarification.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 15:06:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1677525#M6331</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-01-13T15:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Branch Versioning - Get changes in Default version before reconciling</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1681949#M6445</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/138089"&gt;@RobertKrisher&lt;/a&gt;&amp;nbsp;for taking time to answer my question. I agree that the idea of Venkata was right, but as Robert rightly pointed it is better to use the ArcGIS API for Python which I was expecting also. To summarize, the differences method in the version class in ArcGIS API for Python can be used to achieve the required output. They key is to get the SDE.Default version and pass the moment (this is basically to moment) and from_moment parameter.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 04:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/branch-versioning-get-changes-in-default-version/m-p/1681949#M6445</guid>
      <dc:creator>ManojGnanaseelan</dc:creator>
      <dc:date>2026-02-04T04:24:08Z</dc:date>
    </item>
  </channel>
</rss>

