<?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 Disable deleting features while maintaining create and update in a referenced service in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1120403#M11771</link>
    <description>&lt;P&gt;When you host a feature service in Portal you can go to settings and turn on/off if features can be deleted (see below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hosted_editing.JPG" style="width: 332px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28304iB4C5862E30529936/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hosted_editing.JPG" alt="hosted_editing.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This option does not exist when the data is referenced from a registered sde geodatabase. When publishing from ArcGIS Pro there is no option for this either, I seem to recall there was in ArcMap where you could select using check boxes. I do not have access to ArcMap and required to publish via ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arcgis_pro_options.JPG" style="width: 293px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28305iB08E96B8CC79A7EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arcgis_pro_options.JPG" alt="arcgis_pro_options.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need to prevent users from deleting features and leave them with the ability to only edit current features and add new features. The data cannot be hosted and must be via a registered sde geodatabase.&lt;/P&gt;&lt;P&gt;I have exported the JSON of the service and can see that all capabilities are turned on.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"capabilities": "Query,Create,Update,Delete,Uploads,Editing,Sync,Extract"&lt;/LI-CODE&gt;&lt;P&gt;I need to remove the Delete capability.&lt;/P&gt;&lt;P&gt;I have tried to update the capabilities using the Python API with the code below.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import json
from arcgis import GIS
from arcgis.features import FeatureLayer

## connect to Portal
conn = GIS(url="https://url/portal/home", username="username", password="password")

## access the fs via its id
item = conn.content.get('****')

## get the definition json
with open(r"path\to\update_test.json") as json_data:
    data = json.load(json_data)

## access the FeatureLayer components of the item
layer = FeatureLayer(item.url)
## update based on the json
layer.manager.update_definition(data)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Exception: Access to admin resources are not allowed
(Error Code: 403)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JSON file has the following&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "capabilities": "Query,Create,Update,Uploads,Editing,Sync,Extract"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested this on a hosted feature service and it works fine. So what is preventing me doing it on a referenced feature service with data published from a registered database? Any help appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Nov 2021 09:34:26 GMT</pubDate>
    <dc:creator>Clubdebambos</dc:creator>
    <dc:date>2021-11-26T09:34:26Z</dc:date>
    <item>
      <title>Disable deleting features while maintaining create and update in a referenced service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1120403#M11771</link>
      <description>&lt;P&gt;When you host a feature service in Portal you can go to settings and turn on/off if features can be deleted (see below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hosted_editing.JPG" style="width: 332px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28304iB4C5862E30529936/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hosted_editing.JPG" alt="hosted_editing.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This option does not exist when the data is referenced from a registered sde geodatabase. When publishing from ArcGIS Pro there is no option for this either, I seem to recall there was in ArcMap where you could select using check boxes. I do not have access to ArcMap and required to publish via ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arcgis_pro_options.JPG" style="width: 293px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28305iB08E96B8CC79A7EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arcgis_pro_options.JPG" alt="arcgis_pro_options.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need to prevent users from deleting features and leave them with the ability to only edit current features and add new features. The data cannot be hosted and must be via a registered sde geodatabase.&lt;/P&gt;&lt;P&gt;I have exported the JSON of the service and can see that all capabilities are turned on.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"capabilities": "Query,Create,Update,Delete,Uploads,Editing,Sync,Extract"&lt;/LI-CODE&gt;&lt;P&gt;I need to remove the Delete capability.&lt;/P&gt;&lt;P&gt;I have tried to update the capabilities using the Python API with the code below.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import json
from arcgis import GIS
from arcgis.features import FeatureLayer

## connect to Portal
conn = GIS(url="https://url/portal/home", username="username", password="password")

## access the fs via its id
item = conn.content.get('****')

## get the definition json
with open(r"path\to\update_test.json") as json_data:
    data = json.load(json_data)

## access the FeatureLayer components of the item
layer = FeatureLayer(item.url)
## update based on the json
layer.manager.update_definition(data)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Exception: Access to admin resources are not allowed
(Error Code: 403)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JSON file has the following&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "capabilities": "Query,Create,Update,Uploads,Editing,Sync,Extract"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested this on a hosted feature service and it works fine. So what is preventing me doing it on a referenced feature service with data published from a registered database? Any help appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 09:34:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1120403#M11771</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2021-11-26T09:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Disable deleting features while maintaining create and update in a referenced service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1120953#M11774</link>
      <description>&lt;P&gt;For non-hosted services, you'd manage the capabilities via Server Manager:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanQuinn_1-1638215036285.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28458i84C063C621861BE6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanQuinn_1-1638215036285.png" alt="JonathanQuinn_1-1638215036285.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 19:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1120953#M11774</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2021-11-29T19:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Disable deleting features while maintaining create and update in a referenced service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1121157#M11775</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/43763"&gt;@JonathanQuinn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had actually gone in there to try that and couldn't see the option to do that. But your screenshot showed me that I needed to highlight the Feature Access component.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="capabilities.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28503i9C4DCCD69B9EAC5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="capabilities.JPG" alt="capabilities.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Which then opens up those capabilities.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="capabilities_2.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28504i3736D4386F5969C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="capabilities_2.JPG" alt="capabilities_2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 08:01:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1121157#M11775</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2021-11-30T08:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Disable deleting features while maintaining create and update in a referenced service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1164604#M12207</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/43763"&gt;@JonathanQuinn&lt;/a&gt;, are you saying that those capabilities are not accessible via the ArcGIS API for Python?&lt;BR /&gt;&lt;BR /&gt;I am trying to programmatically change a bunch of services to enable sync, launched via bulk publish from an Enterprise Datastore Item. I have not yet been successful after trying a few routes.&lt;BR /&gt;&lt;BR /&gt;I've tried to access the FeatureLayer.manager and have received the same error. I don't quite understand it because I'm utilizing the admin_url found at the:&amp;nbsp;&lt;EM&gt;portaladmin/federation/servers&lt;/EM&gt; location&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Access to admin resources are not allowed&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(Error Code: 403)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I've also tried accessing the datastore.publish_layers but am a bit confused about the correct structuring of the service configuration template (srv_config). I have a Github issue open as well with regard to documentation:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-python-api/issues/1227" target="_blank"&gt;https://github.com/Esri/arcgis-python-api/issues/1227&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Publish layes failed.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Invalid value for serverFolder. Layers have been published from this data store before and the value is read-only. Passing null is valid. &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(Error Code: 400)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 21:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1164604#M12207</guid>
      <dc:creator>feralcatcolonist_old</dc:creator>
      <dc:date>2022-04-14T21:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Disable deleting features while maintaining create and update in a referenced service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1562918#M15922</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/447297"&gt;@feralcatcolonist_old&lt;/a&gt;, Did you figure this out? I have the same issue trying to sync a bulk published datastore item using the python API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;bulk_publish_job = portal_ds.publish_layers(item = db_dsitem,
                                            srv_config = service_template,
                                            server_id = host_id,
                                            folder = None,
                                            server_folder= None)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;returns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Exception: Publish layers failed.
Invalid value for serverFolder. Layers have been published from this data store before and the value is read-only. Passing null is valid. &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Skipping the&amp;nbsp;server_folder argument returns the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 04:01:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/disable-deleting-features-while-maintaining-create/m-p/1562918#M15922</guid>
      <dc:creator>DrewDowling</dc:creator>
      <dc:date>2024-11-27T04:01:11Z</dc:date>
    </item>
  </channel>
</rss>

