Select to view content in your preferred language

Allow editing with developer credentials AND limit scope to specified items

309
2
Jump to solution
01-06-2025 02:20 PM
jdyerLACSD
Occasional Contributor

I can limit item access for developer credentials to specific items, and those items are the only non-public items that can be viewed with those credentials.  But once I try to add editing privileges to the credentials (or any general privileges), the credentials change from "standard" to "personal", and they can now do everything I can do on every item I have access to, despite any item access settings in place.

Is there any way to create and configure developer credentials (OAuth2 or API key) to, for instance, be able to edit layers in a single item, but not delete that item, publish new content, or view/edit any other non-public items in my ArcGIS Online portal?

0 Kudos
1 Solution

Accepted Solutions
John-Foster
Esri Contributor

@jdyerLACSD wrote:

Is there any way to create and configure developer credentials (OAuth2 or API key) to, for instance, be able to edit layers in a single item, but not delete that item, publish new content, or view/edit any other non-public items in my ArcGIS Online portal?


 

You can create an API key and scope it to your hosted feature service. In the item settings for your feature service turn on editing. This way you do not have to use the personal privileges and the api key is scoped to just this 1 item.

fs-1.png

 

--jf

View solution in original post

2 Replies
John-Foster
Esri Contributor

@jdyerLACSD wrote:

Is there any way to create and configure developer credentials (OAuth2 or API key) to, for instance, be able to edit layers in a single item, but not delete that item, publish new content, or view/edit any other non-public items in my ArcGIS Online portal?


 

You can create an API key and scope it to your hosted feature service. In the item settings for your feature service turn on editing. This way you do not have to use the personal privileges and the api key is scoped to just this 1 item.

fs-1.png

 

--jf
jdyerLACSD
Occasional Contributor

Just the solution I needed.  So if I wanted a layer to be publicly viewable (not editable), but still wanted to programmatically update the data with a token scoped only to that layer, I would....

  1. Create a private feature layer
  2. Turn on editing
  3. Create an API key scoped just to that layer (now I can make feature edits programmatically)
  4. Create a non-editable view of the layer
  5. Share the view publicly
0 Kudos