I am interested in conducting an inventory of all our content items in Portal in an effort to clean up content. Is there a way to download a spreadsheet listing all content found in our organization?
Solved! Go to Solution.
What version are you on? You can go into Organization → Status → Reports to create an Item report with details about all content, but I believe that was added in 10.9.
What version are you on? You can go into Organization → Status → Reports to create an Item report with details about all content, but I believe that was added in 10.9.
Thanks Josh, we are running 10.8 still. This is good to know though when we upgrade!
You could still get a similar list via Python, too. I have an old code snippet I used to use back on 10.8 that I could dig up if you're interested.
Hi Josh, I would be interested in that actually, based on the timing of our inventory and when we'll be upgrading to 10.9 later. Thanks!
from arcgis import GIS
import pandas as pd
gis = GIS('portal url', 'user', 'password')
content_list = gis.content.search('NOT owner:esri_apps', max_items=-1)
out_dict = {}
for item in content_list:
out_dict[content_list.index(item)] = [item.title, item.type, item.numViews, item.owner, item.id]
df = pd.DataFrame.from_dict(out_dict, orient='index')
df.rename(columns={0:'title', 1:'type', 2:'views', 3:'owner', 4:'id'}, inplace=True)
df.to_csv('your-report-name.csv')
That oughta do it. You can pretty easily alter this to include additional properties in the output, but this is a start.