Skip to main content

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!

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


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!


Reply