ArcGIS Pro 3.1, Python 3.9
I'm using the ArcGIS Python API to connect to Portal (11.1) and AGOL to filter for deprecated items. According this reference doc, Item Fields can be passed to the query parameter. However, none of the parameter values return any values, e.g:
gis.content.search(query= 'contentStatus:deprecated') --> returns: []
Am I missing something?
It works with other values, such as id:1234, or owner:my_username.
EDIT: Printing all properties shows the expected contentStatus property.
Similarly, using .contentStatus or .content_status also shows the correct value. https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.content_status
It seems iterating all item_id numbers is an option, though not ideal.



item = gis.content.get(item_id)) and then print all of that item's properties (eg, usingprint(json.dumps(dict(item), indent=4)))? Please update your question post to include the results.