<?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: Enabling Sync via Arcgis python code in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1640332#M11555</link>
    <description>&lt;P&gt;I think you need to look at your content.&amp;nbsp; It says there are errors before it can be used in offline mode.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Aug 2025 13:30:22 GMT</pubDate>
    <dc:creator>Jeremiah_Martin</dc:creator>
    <dc:date>2025-08-08T13:30:22Z</dc:date>
    <item>
      <title>Enabling Sync via Arcgis python code</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1640012#M11554</link>
      <description>&lt;P&gt;I want to enable sync in the webmap !&lt;BR /&gt;My workflow is :&lt;BR /&gt;1. Create a zip of a gdb&lt;BR /&gt;2. Upload the zip&lt;BR /&gt;3. Extract and create the hosted feature layers&lt;BR /&gt;4. Enable Editor tracking on hosted feature layer&lt;BR /&gt;5. enable sync in the hosted feature layer&lt;BR /&gt;6. Create a Webmap&lt;BR /&gt;7. Add hosted layers to the webmap&lt;BR /&gt;5. enable sync in the webmap&lt;BR /&gt;Here is my code :&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import os&lt;BR /&gt;import zipfile&lt;BR /&gt;from arcgis.gis import GIS&lt;BR /&gt;from datetime import datetime&lt;BR /&gt;from arcgis.features import FeatureLayerCollection&lt;BR /&gt;import time&lt;BR /&gt;import pandas as pd&lt;BR /&gt;from arcgis.map import Map&lt;BR /&gt;import re&lt;BR /&gt;import json&lt;/P&gt;&lt;P&gt;def get_always_hidden_fields(df, sheet_name):&lt;BR /&gt;if not {'Section', 'Name', 'AlwaysHidden'}.issubset(df.columns):&lt;BR /&gt;return []&lt;/P&gt;&lt;P&gt;hidden_rows = df[df['AlwaysHidden'] == 1]&lt;BR /&gt;return [f"{sheet_name}: {row['Name']}=1" for _, row in hidden_rows.iterrows()]&lt;/P&gt;&lt;P&gt;def build_fields_to_hide_dict(excel_path):&lt;BR /&gt;all_sheets = pd.read_excel(excel_path, sheet_name=None)&lt;BR /&gt;field_map = {}&lt;/P&gt;&lt;P&gt;for sheet_name, df in all_sheets.items():&lt;BR /&gt;hidden_fields = get_always_hidden_fields(df, sheet_name)&lt;BR /&gt;for item in hidden_fields:&lt;BR /&gt;try:&lt;BR /&gt;section, rest = item.split(":")&lt;BR /&gt;field_name, _ = rest.strip().split("=")&lt;BR /&gt;section = section.strip()&lt;BR /&gt;field_name = field_name.strip()&lt;/P&gt;&lt;P&gt;if section not in field_map:&lt;BR /&gt;field_map[section] = set()&lt;BR /&gt;field_map[section].add(field_name)&lt;BR /&gt;except Exception as e:&lt;BR /&gt;print(f"Skipping malformed entry '{item}': {e}")&lt;BR /&gt;return field_map&lt;/P&gt;&lt;P&gt;def hide_fields_in_layers(flc, field_map):&lt;BR /&gt;for lyr in flc.layers + flc.tables:&lt;BR /&gt;layer_name = lyr.properties.name&lt;/P&gt;&lt;P&gt;if layer_name not in field_map:&lt;BR /&gt;continue&lt;/P&gt;&lt;P&gt;_fields_to_hide = field_map[layer_name]&lt;BR /&gt;fields_definition_update = []&lt;/P&gt;&lt;P&gt;for field in lyr.properties.fields:&lt;BR /&gt;if field["name"] in _fields_to_hide:&lt;BR /&gt;fields_definition_update.append({&lt;BR /&gt;"name": field["name"],&lt;BR /&gt;"visible": False&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;if fields_definition_update:&lt;BR /&gt;update_payload = {"fields": fields_definition_update}&lt;BR /&gt;lyr.manager.update_definition(update_payload)&lt;BR /&gt;print(f"Updated visibility in: {layer_name}")&lt;BR /&gt;else:&lt;BR /&gt;print(f"No matching fields to hide in: {layer_name}")&lt;/P&gt;&lt;P&gt;# Function to list all feature classes and tables in the given geodatabase&lt;BR /&gt;def list_gdb_contents_detail(workspace):&lt;BR /&gt;arcpy.env.workspace = workspace&lt;BR /&gt;list_Paths = []&lt;BR /&gt;list_types = []&lt;/P&gt;&lt;P&gt;# List feature datasets and add empty string for root-level feature classes&lt;BR /&gt;datasets = arcpy.ListDatasets(feature_type='feature')&lt;BR /&gt;datasets = [''] + datasets if datasets is not None else []&lt;/P&gt;&lt;P&gt;# Loop through feature datasets and collect feature classes&lt;BR /&gt;for ds in datasets:&lt;BR /&gt;for fc in arcpy.ListFeatureClasses(feature_dataset=ds):&lt;BR /&gt;path = os.path.join(arcpy.env.workspace, ds, fc)&lt;BR /&gt;list_Paths.append(path)&lt;BR /&gt;list_types.append('Fc')&lt;/P&gt;&lt;P&gt;# List tables in the geodatabase&lt;BR /&gt;tables = arcpy.ListTables()&lt;BR /&gt;for table in tables:&lt;BR /&gt;list_Paths.append(table)&lt;BR /&gt;list_types.append('Tables')&lt;/P&gt;&lt;P&gt;return list_Paths, list_types&lt;/P&gt;&lt;P&gt;# Function to zip the given file geodatabase with a timestamp&lt;BR /&gt;def zipGDB(inputGDB):&lt;BR /&gt;gdbFile = str(inputGDB)&lt;BR /&gt;timestamp = datetime.now().strftime("%Y_%m_%d_%H_%M_%S")&lt;BR /&gt;outFile = gdbFile[0:-4] + '_' + timestamp + '.zip'&lt;BR /&gt;gdbName = os.path.basename(gdbFile)&lt;/P&gt;&lt;P&gt;# Create a zip archive excluding .lock files&lt;BR /&gt;with zipfile.ZipFile(outFile, mode='w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as myzip:&lt;BR /&gt;for f in os.listdir(gdbFile):&lt;BR /&gt;if f[-5:] != '.lock':&lt;BR /&gt;myzip.write(os.path.join(gdbFile, f), gdbName + '\\' + os.path.basename(f))&lt;/P&gt;&lt;P&gt;return str(outFile)&lt;BR /&gt;def enable_sync_in_webmap_layers(webmap_item_id, gis):&lt;BR /&gt;try:&lt;BR /&gt;webmap = gis.content.get(webmap_item_id)&lt;BR /&gt;if not webmap:&lt;BR /&gt;print(f"Web map with ID '{webmap_item_id}' not found.")&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;#webmap = gis.content.get(webmap_item_id)&lt;BR /&gt;webmap_dict = webmap.get_data()&lt;BR /&gt;operational_layers = webmap_dict.get("operationalLayers", [])&lt;BR /&gt;tables = webmap_dict.get("tables", [])&lt;BR /&gt;all_layers = operational_layers + tables&lt;BR /&gt;token = gis._con.token&lt;BR /&gt;#print(str(token))&lt;BR /&gt;processed_service_urls = set()&lt;/P&gt;&lt;P&gt;for layer in all_layers:&lt;BR /&gt;layer_url = layer.get("url")&lt;BR /&gt;if not layer_url:&lt;BR /&gt;continue&lt;/P&gt;&lt;P&gt;# Remove the trailing /layerId to get the base service URL&lt;BR /&gt;service_url = re.sub(r"/\d+$", "", layer_url)&lt;/P&gt;&lt;P&gt;if service_url in processed_service_urls:&lt;BR /&gt;continue # Already processed&lt;/P&gt;&lt;P&gt;processed_service_urls.add(service_url)&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;# Get the service item using the URL&lt;BR /&gt;flc = FeatureLayerCollection(service_url, gis)&lt;BR /&gt;#capabilities = flc.properties.get("capabilities", "")&lt;/P&gt;&lt;P&gt;# If service requires token and you are authenticated, this will succeed&lt;BR /&gt;capabilities = flc.properties.get("capabilities", "")&lt;BR /&gt;if "Sync" not in capabilities:&lt;BR /&gt;new_capabilities = ",".join(sorted(set(capabilities.split(",") + ["Sync"])))&lt;BR /&gt;flc.manager.update_definition({"capabilities": new_capabilities})&lt;BR /&gt;print(f" Enabled Sync for: {service_url}")&lt;BR /&gt;else:&lt;BR /&gt;print(f" Sync already enabled for: {service_url}")&lt;/P&gt;&lt;P&gt;except Exception as inner_err:&lt;BR /&gt;print(f" Failed to enable sync for service: {service_url}\n Error: {inner_err}")&lt;/P&gt;&lt;P&gt;except Exception as e:&lt;BR /&gt;print(f"Error processing web map: {e}")&lt;/P&gt;&lt;P&gt;def enable_webmap_offline(webmap_item_id, gis):&lt;BR /&gt;try:&lt;BR /&gt;webmap_item = gis.content.get(webmap_item_id)&lt;BR /&gt;if not webmap_item:&lt;BR /&gt;print(f"Web map with ID '{webmap_item_id}' not found.")&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;# Check current offline status&lt;BR /&gt;item_properties = webmap_item.get_data()&lt;BR /&gt;if item_properties.get("offlineEnabled", False):&lt;BR /&gt;print(f"Web map '{webmap_item.title}' is already offline-enabled.")&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;# Update the item with offlineEnabled flag&lt;BR /&gt;update_dict = {&lt;BR /&gt;"text": json.dumps({**item_properties, "offlineEnabled": True})&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;webmap_item.update(item_properties=update_dict)&lt;BR /&gt;print(f"Web map '{webmap_item.title}' is now enabled for offline use.")&lt;/P&gt;&lt;P&gt;except Exception as e:&lt;BR /&gt;print(f"Failed to enable offline for Web Map: {e}")&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;/P&gt;&lt;P&gt;# --- Configuration ---&lt;BR /&gt;_gdb_path = r"F:\test\10\PIT_v9.gdb"&lt;BR /&gt;_username = "test"&lt;BR /&gt;_password = "test@123"&lt;BR /&gt;_url = "&lt;A href="https://test.maps.arcgis.com/" target="_blank"&gt;https://test.maps.arcgis.com/&lt;/A&gt;"&lt;BR /&gt;_folder_name = "Test-Rahul"&lt;BR /&gt;_excel_file_path = r"F:\test\10\test_datamodel_def.xlsx"&lt;BR /&gt;_proj_name= "test"&lt;/P&gt;&lt;P&gt;field_map = build_fields_to_hide_dict(_excel_file_path)&lt;BR /&gt;# Record script start time&lt;BR /&gt;start_time = datetime.now()&lt;/P&gt;&lt;P&gt;# List feature classes and tables in GDB&lt;BR /&gt;list_Paths, list_types = list_gdb_contents_detail(_gdb_path)&lt;/P&gt;&lt;P&gt;# Fields for editor tracking&lt;BR /&gt;creator_field = "created_user"&lt;BR /&gt;creation_date_field = "created_date"&lt;BR /&gt;last_editor_field = "last_edited_user"&lt;BR /&gt;last_edit_date_field = "last_edited_date"&lt;/P&gt;&lt;P&gt;# Enable editor tracking and add GPS metadata fields&lt;BR /&gt;for path, typ in zip(list_Paths, list_types):&lt;BR /&gt;arcpy.management.EnableEditorTracking(path, creator_field, creation_date_field, last_editor_field, last_edit_date_field, "ADD_FIELDS", "UTC")&lt;BR /&gt;if typ == 'Fc':&lt;BR /&gt;arcpy.management.AddGPSMetadataFields(path)&lt;/P&gt;&lt;P&gt;print("GDB has been updated with Editor Tracking &amp;amp; GPS Fields")&lt;/P&gt;&lt;P&gt;# Zip the geodatabase&lt;BR /&gt;zipped_path = zipGDB(_gdb_path)&lt;BR /&gt;print("GDB has been Zipped at :" + str(zipped_path))&lt;/P&gt;&lt;P&gt;# Connect to ArcGIS Online&lt;BR /&gt;gis = GIS(_url, _username, _password)&lt;BR /&gt;print("Connected to Arcgis Online")&lt;/P&gt;&lt;P&gt;zip_name = os.path.basename(zipped_path)&lt;BR /&gt;new_name = zip_name.replace(".zip", "")&lt;BR /&gt;user = gis.users.me&lt;/P&gt;&lt;P&gt;# Check if the folder exists, if not, create it&lt;BR /&gt;existing_folders = [f.name for f in user.folders]&lt;BR /&gt;if _folder_name not in existing_folders:&lt;BR /&gt;gis.content.create_folder(folder=_folder_name)&lt;/P&gt;&lt;P&gt;print(f"Uploading {zip_name}...")&lt;BR /&gt;today = datetime.now().strftime("%d %B %Y")&lt;BR /&gt;# Upload the zipped GDB to the specified folder&lt;BR /&gt;target_folder = next((f for f in user.folders if f.name == _folder_name), None)&lt;BR /&gt;uploaded_item = target_folder.add(&lt;BR /&gt;item_properties={&lt;BR /&gt;'title': zip_name,&lt;BR /&gt;'type': 'File Geodatabase',&lt;BR /&gt;'tags': 'file geodatabase, gdb',&lt;BR /&gt;'description': 'Uploaded template file geodatabase for ' +str(_proj_name) +' on '+str(today)&lt;BR /&gt;},&lt;BR /&gt;file=zipped_path&lt;BR /&gt;).result()&lt;/P&gt;&lt;P&gt;print(f"Successfully uploaded {zip_name} with item ID: {uploaded_item.id}")&lt;/P&gt;&lt;P&gt;# Publish the uploaded GDB as a hosted feature layer&lt;BR /&gt;print("Extracting file geodatabase...")&lt;BR /&gt;extracted_items = uploaded_item.publish()&lt;/P&gt;&lt;P&gt;# Update the item title&lt;BR /&gt;item = gis.content.get(extracted_items.id)&lt;BR /&gt;item.update({"title": new_name})&lt;BR /&gt;print("Hosted Feature Layer Id..." + str(extracted_items.id))&lt;BR /&gt;time.sleep(3)&lt;BR /&gt;feature_layer_item = gis.content.get(str(extracted_items.id))&lt;BR /&gt;flc = FeatureLayerCollection.fromitem(feature_layer_item)&lt;/P&gt;&lt;P&gt;# Enable editor tracking in the hosted feature layer&lt;BR /&gt;edit_dict = {&lt;BR /&gt;"hasStaticData": False,&lt;BR /&gt;"capabilities": "Query, Editing, Create, Update, Delete, ChangeTracking",&lt;BR /&gt;"editorTrackingInfo": {&lt;BR /&gt;"enableEditorTracking": True,&lt;BR /&gt;"enableOwnershipAccessControl": False,&lt;BR /&gt;"allowOthersToUpdate": True,&lt;BR /&gt;"allowOthersToDelete": True,&lt;BR /&gt;"allowOthersToQuery": True,&lt;BR /&gt;"allowAnonymousToUpdate": True,&lt;BR /&gt;"allowAnonymousToDelete": True&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;flc.manager.update_definition(edit_dict)&lt;BR /&gt;print(f"Editor tracking enabled successfully!")&lt;/P&gt;&lt;P&gt;sync_result = flc.manager.update_definition({"syncEnabled": True})&lt;BR /&gt;if sync_result.get("success"):&lt;BR /&gt;print(f"Sync enabled for hosted layer: {new_name}")&lt;BR /&gt;else:&lt;BR /&gt;print(f"Failed to enable sync for hosted layer: {new_name}")&lt;BR /&gt;print("Result:", sync_result)&lt;BR /&gt;"""# Enable sync settings for offline use&lt;BR /&gt;update_dict = {&lt;BR /&gt;"syncEnabled": True,&lt;BR /&gt;"syncCapabilities": {&lt;BR /&gt;"supportsAsync": True,&lt;BR /&gt;"supportsRegisteringExistingData": True,&lt;BR /&gt;"supportsSyncDirectionControl": True,&lt;BR /&gt;"supportsPerLayerSync": True,&lt;BR /&gt;"supportsPerReplicaSync": False,&lt;BR /&gt;"supportsRollbackOnFailure": False,&lt;BR /&gt;"supportsAttachmentsSyncDirection": True&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;flc.manager.update_definition(update_dict)&lt;BR /&gt;print(f"Successfully enabled offline use for {item.title}")&lt;BR /&gt;time.sleep(5)&lt;BR /&gt;update_dict = {&lt;BR /&gt;"syncEnabled": True,&lt;BR /&gt;"syncCapabilities": {&lt;BR /&gt;"supportsAsync": True,&lt;BR /&gt;"supportsRegisteringExistingData": True,&lt;BR /&gt;"supportsSyncDirectionControl": True,&lt;BR /&gt;"supportsPerLayerSync": True,&lt;BR /&gt;"supportsPerReplicaSync": False,&lt;BR /&gt;"supportsRollbackOnFailure": False,&lt;BR /&gt;"supportsAttachmentsSyncDirection": True&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;flc.manager.update_definition(update_dict)"""&lt;BR /&gt;print("Sync enabled successfully!")&lt;/P&gt;&lt;P&gt;# --------- Update Individual Layers ---------&lt;BR /&gt;print("\nUpdating individual layers...")&lt;BR /&gt;for lyr in item.layers:&lt;BR /&gt;print(f"Updating layer: {lyr.properties.name}")&lt;BR /&gt;layer_def = {&lt;BR /&gt;"editingInfo": {&lt;BR /&gt;"enableEditorTracking": True,&lt;BR /&gt;"enableOwnershipAccessControl": False&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;res = lyr.manager.update_definition(layer_def)&lt;BR /&gt;print(" -&amp;gt; Layer update result:", res)&lt;BR /&gt;# --------- Update Individual Tables ---------&lt;BR /&gt;print("\nUpdating individual tables...")&lt;BR /&gt;for tbl in item.tables:&lt;BR /&gt;print(f"Updating table: {tbl.properties.name}")&lt;BR /&gt;table_def = {&lt;BR /&gt;"editingInfo": {&lt;BR /&gt;"enableEditorTracking": True,&lt;BR /&gt;"enableOwnershipAccessControl": False&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;res = tbl.manager.update_definition(table_def)&lt;BR /&gt;print(" -&amp;gt; Table update result:", res)&lt;/P&gt;&lt;P&gt;# --------- Final Status ---------&lt;BR /&gt;print("\nSync enabled:", flc.properties.syncEnabled)&lt;BR /&gt;hide_fields_in_layers(flc, field_map)&lt;BR /&gt;# Pause to allow server processes to complete&lt;BR /&gt;time.sleep(5)&lt;/P&gt;&lt;P&gt;# Create a new web map with the uploaded hosted feature layer&lt;BR /&gt;webmap = gis.map()&lt;BR /&gt;#webmap.basemap.basemap = "arcgis-light-gray"&lt;BR /&gt;webmap.basemap.basemap = "arcgis-streets"&lt;/P&gt;&lt;P&gt;webmap_properties = {&lt;BR /&gt;"title": "Web_Map_" + str(new_name),&lt;BR /&gt;"snippet": "Test",&lt;BR /&gt;"tags": ["webmap"],&lt;BR /&gt;"description": 'The webmap is for '+str(_proj_name)+' created on '+str(today)+' to serve as a template'&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Add layers and tables to the web map&lt;BR /&gt;for lyr in feature_layer_item.layers:&lt;BR /&gt;webmap.content.add(lyr)&lt;/P&gt;&lt;P&gt;for tbl in feature_layer_item.tables:&lt;BR /&gt;webmap.content.add(tbl)&lt;/P&gt;&lt;P&gt;# Save the web map and move it to the desired folder&lt;BR /&gt;webmap_item = webmap.save(item_properties=webmap_properties)&lt;BR /&gt;if _folder_name:&lt;BR /&gt;item = gis.content.get(webmap_item.id)&lt;BR /&gt;item.move(_folder_name)&lt;/P&gt;&lt;P&gt;print(f"Web map created successfully: {webmap_item.title} (ID: {webmap_item.id})")&lt;BR /&gt;time.sleep(5)&lt;BR /&gt;enable_sync_in_webmap_layers(webmap_item.id, gis)&lt;BR /&gt;time.sleep(5)&lt;BR /&gt;enable_webmap_offline(webmap_item.id, gis)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Calculate and print the total duration&lt;BR /&gt;end_time = datetime.now()&lt;BR /&gt;duration = end_time - start_time&lt;BR /&gt;hours, remainder = divmod(duration.seconds, 3600)&lt;BR /&gt;minutes, seconds = divmod(remainder, 60)&lt;BR /&gt;formatted_diff = f"{hours:02}:{minutes:02}:{seconds:02}"&lt;BR /&gt;print("Duration : ", formatted_diff)&lt;BR /&gt;print("End")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;There are no errors but sync are not getting enabled in the webmap. Refer to the screen shot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rahul_Pandia_0-1754577679230.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138055i21A9C163466B874F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rahul_Pandia_0-1754577679230.png" alt="Rahul_Pandia_0-1754577679230.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please let me know how to resolve this issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 14:44:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1640012#M11554</guid>
      <dc:creator>Rahul_Pandia</dc:creator>
      <dc:date>2025-08-07T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling Sync via Arcgis python code</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1640332#M11555</link>
      <description>&lt;P&gt;I think you need to look at your content.&amp;nbsp; It says there are errors before it can be used in offline mode.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 13:30:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1640332#M11555</guid>
      <dc:creator>Jeremiah_Martin</dc:creator>
      <dc:date>2025-08-08T13:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling Sync via Arcgis python code</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1641167#M11564</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/482431"&gt;@Rahul_Pandia&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You don't set the sync capability to a WebMap, you set it for the layers (the Feature Layers / Feature Service). Your Asset layer needs to be sync enabled.&lt;/P&gt;&lt;P&gt;Add Sync to your capabilities...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;"capabilities": "Query, Editing, Create, Update, Delete, Sync, ChangeTracking"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please also use the code snippet format to make the code easier to read?&lt;/P&gt;&lt;P&gt;Select the ellipsis (...)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clubdebambos_0-1754983619722.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138369iD4784EB902ACFC24/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clubdebambos_0-1754983619722.png" alt="Clubdebambos_0-1754983619722.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select Insert/Edit code sample...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clubdebambos_1-1754983667519.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138370i74986F4A6E919CB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clubdebambos_1-1754983667519.png" alt="Clubdebambos_1-1754983667519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select Python from the language dropdown&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clubdebambos_2-1754983713597.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138371i2100C3F10D2D427A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clubdebambos_2-1754983713597.png" alt="Clubdebambos_2-1754983713597.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 07:30:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/enabling-sync-via-arcgis-python-code/m-p/1641167#M11564</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-08-12T07:30:27Z</dc:date>
    </item>
  </channel>
</rss>

