Skip to main content
Question

Overwriting an AGOL Feature Layer that has editing DISABLED


smithgk
Contributor
Forum|alt.badge.img+6

Hello!

 

I am having some trouble overwriting a hosted feature layer on ArcGIS Online that is public and has editing disabled. I have a geojson file that is updated fairly regularly and I would like to create a workflow that reads the geojson and writes it to an AGOL feature service. I have that initial-publish workflow down, but after I log onto AGOL and change the feature service to public (sharing) and disable editing, subsequent runs of my FME tool fail and produce an error stating,

 

"Feature Service 'xxx_layer' does not support writer mode ''. Its owner may have disabled inserting or editing features. Writes may fail if the current user is not the owner or administrator".

 

That error makes sense since I've disabled editing to the feature service, but I'm wondering if there is a way for FME to overwrite the feature service without me having to enable edits on the AGOL feature service. Because the data is public facing, I cannot allow edits to be enabled. Any help is greatly appreciated, thank you!

4 replies

hkingsbury
Celebrity
Forum|alt.badge.img+50
  • Celebrity
  • June 28, 2023

Two approaches, first being the 'proper' way, second being a more hacky way

1.

In agol, you should be able to share the layer to various groups, one group would be an access only group, and the group would only have read rights on the data. The second would be an admin group that allows read/write/update rights.

 

The first group can be made public, and the second can be limited to only certain users. You'd use this later user/group to update the data

 

2.

Before you run the edits, make a call to this API

https://developers.arcgis.com/rest/services-reference/online/update-definition-feature-service-.htm

To enable the correct capabilities to allow for editing.

Once youve done the edits, make a call to the same api to make it uneditable again


smithgk
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • June 28, 2023
hkingsbury wrote:

Two approaches, first being the 'proper' way, second being a more hacky way

1.

In agol, you should be able to share the layer to various groups, one group would be an access only group, and the group would only have read rights on the data. The second would be an admin group that allows read/write/update rights.

 

The first group can be made public, and the second can be limited to only certain users. You'd use this later user/group to update the data

 

2.

Before you run the edits, make a call to this API

https://developers.arcgis.com/rest/services-reference/online/update-definition-feature-service-.htm

To enable the correct capabilities to allow for editing.

Once youve done the edits, make a call to the same api to make it uneditable again

Awesome, thank you! I'll give both these solutions a try and make sure they are solid for my workflow. I did find another solution too...the initial AGOL feature layer is private and editable, but I was able to make a View from the data and then set that new View layer to Public and uneditable. I like this way too since I can make multiple views off of one feature layer, and each view can have a set of filters to only display certain types of data, attributes, etc.

 

Either way, thanks very much for the reply and solutions!


ben_vanderford
Contributor
Forum|alt.badge.img+3

I hit a couple of problems. 

The account that owns the content to be updated is not an administrator role.

This first work around will not work without the administrator role.  

Is there a way FME can disable editing on all the features after the updates? Maybe a piece of python that runs at the end?  

 

 

 


carmijo
Contributor
Forum|alt.badge.img+11
  • Contributor
  • January 31, 2025
smithgk wrote:
hkingsbury wrote:

Two approaches, first being the 'proper' way, second being a more hacky way

1.

In agol, you should be able to share the layer to various groups, one group would be an access only group, and the group would only have read rights on the data. The second would be an admin group that allows read/write/update rights.

 

The first group can be made public, and the second can be limited to only certain users. You'd use this later user/group to update the data

 

2.

Before you run the edits, make a call to this API

https://developers.arcgis.com/rest/services-reference/online/update-definition-feature-service-.htm

To enable the correct capabilities to allow for editing.

Once youve done the edits, make a call to the same api to make it uneditable again

Awesome, thank you! I'll give both these solutions a try and make sure they are solid for my workflow. I did find another solution too...the initial AGOL feature layer is private and editable, but I was able to make a View from the data and then set that new View layer to Public and uneditable. I like this way too since I can make multiple views off of one feature layer, and each view can have a set of filters to only display certain types of data, attributes, etc.

 

Either way, thanks very much for the reply and solutions!

Hey there. Which route did you end up using?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings