I am trying to make a list of all portal items in my content that have a 'tbd' or 'TBD' tag (indicating 'to be deleted'). However, the list only contains 20 items but there should be 33 according to doing a search on the portal site using either 'tbd or 'TBD'.
gis = GIS(url = 'https://myportalorg.org/arcgis/sharing/', username = 'username', password = 'password')
dList1 = gis.content.search(query='tags:tbd')
dList2 = gis.content.search(query='tags:TBD')
delList = dList1 + dList2
len(delList)
20
I did a check on one of the items not showing up using its item ID:
delItem = gis.content.get('99999999999999999999999999')
delItem.tags
['Analysis Result', 'Join Features', 'tbd']
Why aren't all of the items with the 'tbd' or 'TBD' tags not showing up in the list after running the content searches?
Solved! Go to Solution.
Specify your max_items parameter. For unlimited search results, use max_items=-1.
Specify your max_items parameter. For unlimited search results, use max_items=-1.
That worked! Thank you.