Is it possible to audit the sharing level for every item in portal without browsing to each item? Perhaps with the rest API?
Solved! Go to Solution.
It could be easy enough with the Python API.
import arcgis
gis = arcgis.GIS('your url', 'user', 'password')
items = gis.content.search('-owner:esri -owner:esri_apps', max_items=-1)
for i in items:
print(i.title, i.shared_with)
If you like, you could have this write to a text file instead of simply printing each line, but this should give you a good starting point.
Yes, sharing information is exposed in the REST api and I have done complete inventories of my site with the Python API.
It could be easy enough with the Python API.
import arcgis
gis = arcgis.GIS('your url', 'user', 'password')
items = gis.content.search('-owner:esri -owner:esri_apps', max_items=-1)
for i in items:
print(i.title, i.shared_with)
If you like, you could have this write to a text file instead of simply printing each line, but this should give you a good starting point.
Comment on @jcarlson's elegant query.
That "everything but esri" query is critical, otherwise you will get hundreds of useless-to-you results back that are from the Esri catalog. The default max_items is 500 and without the query string you will always get back 500 items. I found that very confusing at first.
That did it all right! Thanks @Brian_Wilson and @jcarlson.
I also needed to exclude the esri_nav user from the search.
I think you're allowed to delete the esri_nav stuff, aren't you? It's just the other two that you're stuck with. I seem to recall removing all those, hence the omission from my query.