How to use the content_status property 'authoritative' in an item search

2045
10
Jump to solution
04-29-2021 12:02 PM
JaredPilbeam2
MVP Regular Contributor

I'm looking at content_status property for 'authoritative' in the docs. I'm not sure how to use that as a parameter in a search. What I want to do is list all my 'authoritative' hosted feature layers and then download them.

I didn't think it would work, but I have tried:

 

from arcgis.gis import GIS
gis = GIS("", "", "")

my_content = gis.content.search(query="owner:" + gis.users.me.username, 
                                item_type="Feature Layer", 
                                content_status='authoritative',
                                max_items=15)
my_content

#error
TypeError: search() got an unexpected keyword argument 'content_status'
cont = my_content.content_status='authoritative'
cont

#error
AttributeError: 'list' object has no attribute 'content_status'
items= gis.content.search(content_status='authoritative')

#error
TypeError: search() got an unexpected keyword argument 'content_status'

 

0 Kudos
10 Replies
JaredPilbeam2
MVP Regular Contributor

Perhaps? I was signed in as me. I haven't tried it as an admin. I'll keep that in mind!

0 Kudos