<?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: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1417434#M39381</link>
    <description>&lt;P&gt;Bump. Facing same problem&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 08:26:50 GMT</pubDate>
    <dc:creator>HaseebAnwar</dc:creator>
    <dc:date>2024-05-01T08:26:50Z</dc:date>
    <item>
      <title>Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1027342#M29469</link>
      <description>&lt;P&gt;I've been trying to update a Service Definition to increase the {"maxRecordCountFactor" : 3} property as I have&amp;nbsp; large data set I'd like to use a dashboard to filter by year, but even though a single year's worth of data is under the feature limit, because of how the dashboard works it hits the feature draw limit before the filtering and will not display all results.&amp;nbsp; Even though the definition doesn't appear I've been able to update this property on Hosted Feature Layers but not on a Feature Layer tied to an SDE data source (referenced data).&lt;/P&gt;&lt;P&gt;Does this mean a non-hosted feature layer can't have their service definition altered or is there some other configuration or process I'm missing?&amp;nbsp; The error I get is a pretty generic:&lt;/P&gt;&lt;PRE&gt;{
 "error": {
  "code": 500,
  "message": "Error performing update definition operation",
  "details": []
 }
}&lt;/PRE&gt;&lt;P&gt;and I get it no matter what I try to update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 21:26:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1027342#M29469</guid>
      <dc:creator>PhilipWeeks</dc:creator>
      <dc:date>2021-02-16T21:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1036745#M29698</link>
      <description>&lt;P&gt;I am having a similar issue to this. I need to update the symbology on a referenced feature service via the python api. It works fine a hosted feature service, but I am getting error 404 on the referenced.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 17:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1036745#M29698</guid>
      <dc:creator>LanceKirby2</dc:creator>
      <dc:date>2021-03-15T17:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1417434#M39381</link>
      <description>&lt;P&gt;Bump. Facing same problem&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 08:26:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1417434#M39381</guid>
      <dc:creator>HaseebAnwar</dc:creator>
      <dc:date>2024-05-01T08:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1559512#M40986</link>
      <description>&lt;P&gt;Facing a similar issue as well. Trying to copy symbology from a manually published feature service to bulk published feature service. Both are reading from the same egdb feature class. Getting a 500 error that servicename.FeatureServer does not exist in folder.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 17:53:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1559512#M40986</guid>
      <dc:creator>tigerwoulds</dc:creator>
      <dc:date>2024-11-17T17:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1559701#M40995</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/356276"&gt;@PhilipWeeks&lt;/a&gt;, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/325832"&gt;@LanceKirby2&lt;/a&gt; , &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/608304"&gt;@HaseebAnwar&lt;/a&gt; , &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/111548"&gt;@tigerwoulds&lt;/a&gt; , have any of you opened an Esri Support case?&amp;nbsp; If so, what came of it?&amp;nbsp; Also, providing more details about your environment is helpful, like version to start.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:34:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1559701#M40995</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-11-18T15:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1599575#M41899</link>
      <description>&lt;P&gt;I am running into this same issue. I need to update the displayField property for a referenced dataset that is used in Field Maps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, what I've found is that the FeatureServer is not exposed for referenced data, which is why you are seeing those errors. And the MapServer doesn't have the value that I need to update.&amp;nbsp;&lt;BR /&gt;For referenced data, it seems like it's always a MapServer with feature access enabled, as opposed to an actual FeatureServer. A subtle distinction, but important.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you go into the&amp;nbsp;&lt;SPAN&gt;ArcGIS Server Administrator Directory (&lt;A href="https://enterprise.arcgis.com/en/server/latest/administer/windows/about-the-arcgis-server-administrator-directory.htm" target="_blank"&gt;Introduction to the ArcGIS Server Administrator Directory—ArcGIS Server | Documentation for ArcGIS Enterprise&lt;/A&gt;), you'll be able to see that you only have MapServer endpoints available (even if feature access is enabled), vs FeatureServer endpoints for hosted data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hopefully someone has an update with a work around.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 18:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1599575#M41899</guid>
      <dc:creator>MarkGo</dc:creator>
      <dc:date>2025-03-26T18:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a Service Definition on a non-Hosted Feature Layer (referenced data) via Admin REST</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1639862#M42803</link>
      <description>&lt;P&gt;I wrote code that does something similar, it updates the feature service capabilities. You might be able to adapt it to your needs.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import GIS
import requests
import json


domain = 'gis.domain.org'
folder = 'MyServerFolder'
# login to GIS
gis = GIS(url="https://gis.domain.org/portal/home", profile='sangis_portal_aiteadmin')
token = gis._con.token

# Get a list of services from ArcGIS Server
# from a specific folder
gis_servers = gis.admin.servers.list()
print(gis_servers)
# Assuming a single server for simplicity
server1 = gis_servers[0]
damoa_services = server1.services.list(folder=folder)

for service in damoa_services:
    # Get the service definition
    service_def = requests.get(f'{service.url}?f=json&amp;amp;token={token}').json()
    service_name = service_def['serviceName']
    # Loop through the service extensions to find the FeatureServer extension
    i=0
    for ect in service_def['extensions']:
        if ect['typeName'] == 'FeatureServer':
            print("Enabling Feature Access capabilities...")
            print(f"original capabilities: {service_def['extensions'][i]['capabilities']}")
            # Update capabilities by editing the service definition
            service_def['extensions'][i]['capabilities'] = "Query,Extract"
            print(f"Updated capabilities: {service_def['extensions'][i]['capabilities']}")
            # Construct the URL for editing the service definition
            # This URL is specific to ArcGIS Server REST API
            edit_service_url = f"https://{domain}/arcgis/admin/services/{folder}/{service_name}.MapServer/edit"
            try:
                payload = {
                    'f': 'json',
                    'service':json.dumps(service_def),
                    'token':token
                    }
                # Make the POST request to update the service definition
                response = requests.post(url=edit_service_url, data=payload)
                # Check if the request was successful
                # This doesn't work, 200 is returned even if the update fails
                # Check the responce conteent instead
                if response.status_code == 200:
                    print("Capabilities updated successfully.")
                else:
                    print(f"Failed to update capabilities: {response.text}")
            except requests.exceptions.RequestException as e:
                raise e
            i=0
            break
        else:
              i += 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 22:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/updating-a-service-definition-on-a-non-hosted/m-p/1639862#M42803</guid>
      <dc:creator>DrewDowling</dc:creator>
      <dc:date>2025-08-06T22:22:10Z</dc:date>
    </item>
  </channel>
</rss>

