Hi,
Has anyone tried to use ArcPy cursor to update Hosted Feature Service without login? Today I succeeded in using InsertCursor and UpdateCursor on a private hosted feature service using just the URL without logging in to my Enterprise Portal. Does this mean any person can access a private hosted feature service using ArcPy cursor?
Boyang
UPDATE: After testing I confirmed that, without logging to a portal in ArcGIS Pro, I can only edit public features with editing enabled. This conforms to ArcGIS security rules. False alarm.
Solved! Go to Solution.
If you're using arcpy, you are being authenticated with your organization's portal already in order to check out a license, so I don't think it means anonymous users can edit things.
I could give you a throwaway private feature service URL from a different org if you wanted to test that.
Okay! Here's the URL: https://services6.arcgis.com/U1zX3Wx8hhY7Gb30/arcgis/rest/services/Scratch/FeatureServer/2
There are about 13 random polygons I added. See if anything happens!
If you're using arcpy, you are being authenticated with your organization's portal already in order to check out a license, so I don't think it means anonymous users can edit things.
I could give you a throwaway private feature service URL from a different org if you wanted to test that.
Hi Josh,
Yes I would like to try that out - whether I can use UpdateCursor to delete all features in one of your throwaway private service via URL.
Thanks,
Boyang
Okay! Here's the URL: https://services6.arcgis.com/U1zX3Wx8hhY7Gb30/arcgis/rest/services/Scratch/FeatureServer/2
There are about 13 random polygons I added. See if anything happens!
I got an error:
RuntimeError: cannot open 'https://services6.arcgis.com/U1zX3Wx8hhY7Gb30/arcgis/rest/services/Scratch/FeatureServer/2'
You are absolutely right that my Portal login info is stored in arcpy even though I don't have ArcGIS Pro opened (I ran the script in Anaconda) or portal logged in. If I manually log out my account in ArcGIS Pro, I can't access my own private feature service via cursor. Thanks!
Hosted layers—ArcGIS Online Help | Documentation