Sharing and editing hosted feature layer views

1483
5
09-20-2019 06:01 AM
SusanneJoy1
New Contributor II

Local government with a public facing WebMap, working with hosted feature layer views. I'm new at working with views and am running into an issue with sharing. I would like to be able to create a Public view and an Editing view of parcel and address data. The Editing view I would be able to make edits in Pro or AGOL, and it should automatically push updates to the Public view. The problem I'm running into is that I designate the hosted layer as the Editing view, I am required to make that public in order for the view layer to still be public (and thus not require users to login). However, if I switch and make the original hosted layer Public and create an Editing view, the editing view does not push the updates to the original hosted layer like I want. Am I missing something?

5 Replies
by Anonymous User
Not applicable

Hi Susanne Joy‌ - 

With Hosted Feature Layer Views, data should update across the Views and parent Hosted Feature Layer when edits are made. Keeping the Hosted Feature Layer private and creating a public-facing view would probably be the way to go here. I ran through the workflow quickly and noticed that when originally trying to access the public View, I had not removed my organization short name from the URL. Once I removed this, the URL to my View was "http://www.arcgis.com/home/item.html?id=<itemID>. I was able to access this public View without a login while keeping my editable Hosted Feature Layer private. 

Hope this helps,

Peter

Royce_Simpson
New Contributor III

Hello, I'm trying to do the same thing but am struggling to figure this out.  I have a public web map that is referencing a public view of a hosted feature layer that is editable to the site organization only.   When I try to get to the web map and not be signed in, I get  the signin screen.

If I go into the overview of the web map, I see that the layer (public view) in question is set to our organizational url...  ourorg.maps.arcgis.com....  However, if I go to ago-assistant to try and change the url to "www.arcgis.com...."  I'm presented with a head scratcher.... all the layers are in the form "https://services8.arcgis.com/......"  If I copy paste out that URL, my browser says I need a token to access it. 

Clearly I'm missing something here.  How do I get my web map to see the public view of that layer when the format of the URL for the layer is the standard arcgis server-like rest endpoint?  It doesn't look like I have the choice to use anything but "https://services8.arcgis.com/......."

Thanks much,

-Royce

0 Kudos
Royce_Simpson
New Contributor III

Are there any esri docs that explain step by step how to do this?  I've run across several pages that say that it can be done but don't run down the specifics of how to do it.  For example, in this esri help doc, it states, "You can enable editing on the hosted feature layer and share it with only the group or groups whose members need to edit the layer. Next, create a hosted feature layer view from the editable hosted feature layer but disable editing for the view. Share the view with the sets of people who need read-only access to the data. This is useful if you want the public or your entire organization to view the features but only need a few organization members to edit it."

I can't find anywhere that actually states the steps to take to effectively accomplish this.   If you follow the steps outlined in that quote, you are left in the situation the the OP has outlined.  I see what Peter is getting at with that URL change, in theory, but I'm not seeing how to do that in a practical sense.  Any more elaboration on this or pointer to a detailed step by step process would be very helpful.

Thanks again, Royce

0 Kudos
Royce_Simpson
New Contributor III

I think I've got this figured out but would like some confirmation and even some elaboration by folks in the know.  It seems the mistake I made was that I made the "view" on the top level hosted feature layer and not on the desired sub layer.  When I created the view on the sub layer, I was able to make the originating hosted feature layer private (org only) and editable and then make the view layer public and not editable and the rest endpoint for that layer was visible without logging in.

The question is, why does that work on the sub layer but not on a view created from the top level hosted feature layer.  To that end, I'm confused about the ins-and-outs of the structure of hosted feature layers and the sub layers that they contain?  The terminology is very confusing.  How can a layer contain more layers?  Seems like naming the top level "hosted feature layer" to "hosted feature service" and then the subsequent sub layers would be hosted feature layers.  Similar to how ArcGIS Server naming conventions.   Or maybe the top layer should be "hosted group layer".  It's been hard communicating to my departmental "non gis users" how all this works.  "Open the hosted feature layer and then click the layer and then..."

Anyway, any confirmation that this is the correct way to do this would be greatly appreciated.

0 Kudos
by Anonymous User
Not applicable

Hi @Royce_Simpson - thanks for the detailed description. The terminology can be confusing coming from an ArcGIS Server background. Within ArcGIS Online, hosted feature layer and sublayers is analogous to feature service and layers. From the REST endpoint, I typically follow the ArcGIS Server style of referring to /FeatureServer as 'service' and /FeatureServer/0 as 'layer'. 

You should be able to create a view on the top-level hosted feature layer (service), share it publicly, and access the REST endpoint of either the service or the layers (/FeatureServer or FeatureServer/0) without logging in. Here is some additional documentation on creating hosted feature layer views.

Let me know and I would be happy to get a Support case started for you to troubleshoot why this workflow is still prompting for a login on a publicly shared view. 

Thanks,

-Peter 

0 Kudos