<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use the content_status property 'authoritative' in an item search in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052878#M5990</link>
    <description>&lt;P&gt;As you've noticed, &lt;STRONG&gt;content_status&lt;/STRONG&gt; doesn't seem to be a searchable property in the standard content search.&lt;/P&gt;&lt;P&gt;Oddly, content status needs to be searched in the &lt;STRONG&gt;query string&lt;/STRONG&gt;, and has to be done a couple different ways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;auth_items = gis.content.search('contentstatus:org_authoritative OR contentstatus:public_authoritative')

for item in auth_items:
    # your download process&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: the page you &lt;EM&gt;ought &lt;/EM&gt;to reference is this: &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" target="_blank"&gt;https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it looks like contentstatus isn't in the list. I've sent some feedback to get it added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 19:23:39 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-04-29T19:23:39Z</dc:date>
    <item>
      <title>How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052870#M5989</link>
      <description>&lt;P&gt;I'm looking at &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=search%20authoritative#arcgis.gis.Item.content_status" target="_self"&gt;content_status property&lt;/A&gt; 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.&lt;/P&gt;&lt;P&gt;I didn't think it would work, but I have tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;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'&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;cont = my_content.content_status='authoritative'
cont

#error
AttributeError: 'list' object has no attribute 'content_status'&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;items= gis.content.search(content_status='authoritative')

#error
TypeError: search() got an unexpected keyword argument 'content_status'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 19:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052870#M5989</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-29T19:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052878#M5990</link>
      <description>&lt;P&gt;As you've noticed, &lt;STRONG&gt;content_status&lt;/STRONG&gt; doesn't seem to be a searchable property in the standard content search.&lt;/P&gt;&lt;P&gt;Oddly, content status needs to be searched in the &lt;STRONG&gt;query string&lt;/STRONG&gt;, and has to be done a couple different ways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;auth_items = gis.content.search('contentstatus:org_authoritative OR contentstatus:public_authoritative')

for item in auth_items:
    # your download process&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: the page you &lt;EM&gt;ought &lt;/EM&gt;to reference is this: &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" target="_blank"&gt;https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it looks like contentstatus isn't in the list. I've sent some feedback to get it added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 19:23:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052878#M5990</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-29T19:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052889#M5991</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt; .&lt;/P&gt;&lt;P&gt;If it's is a query string why doesn't this result in anything?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;auth_items = gis.content.search(
    'contentstatus:org_authoritative AND contentstatus:public_authoritative')
for i in auth_items:
    print(i)&lt;/LI-CODE&gt;&lt;P&gt;I ran it with &lt;EM&gt;OR &lt;/EM&gt;but for some reason I only got back a handful of Items from our orginization. And only one of these was mine when I know I have at least eight 'authoritative' layers alone.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 19:45:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052889#M5991</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-29T19:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052895#M5992</link>
      <description>&lt;P&gt;Strange! "AND" won't work; as far as I can tell, an item can't have both statuses.&lt;/P&gt;&lt;P&gt;Try adding the parameter "max_items=-1"?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;auth_items = gis.content.search('contentstatus:org_authoritative OR contentstatus:public_authoritative', max_items=-1)

for i in auth_items:
    print(f'{auth_items.index(i):4} | {i.title}')&lt;/LI-CODE&gt;&lt;P&gt;Returns&lt;/P&gt;&lt;PRE&gt;   0 | 03-35
   1 | Millbrook South Forest Preserve Trails 11x17
   2 | 02-07
   3 | Drainage Districts Oveview
   4 | County Board District and Legislative and Congressional Districts
   5 | 03-29&lt;BR /&gt;...&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Apr 2021 19:57:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052895#M5992</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-29T19:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052908#M5993</link>
      <description>&lt;P&gt;It's hard to say what that query string parameter is doing? The results I'm seeing range from dashboards to webmaps, not just feature layers. And only 1/4 I randomly looked at was 'authoritative'.&lt;BR /&gt;&lt;BR /&gt;That print statement printed out 2045 orginization-wide items, which is basically every item in our AGOL account.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 20:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052908#M5993</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-29T20:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052915#M5994</link>
      <description>&lt;P&gt;Well, anything can have "Authoritative" status. Add "item_type='Feature Layer'" to further filter that.&lt;/P&gt;&lt;P&gt;Odd that it would cast such a wide net. When I test it, it brings back the expected items.&lt;/P&gt;&lt;P&gt;Try watching your network traffic when you click the "Authoritative" filter in the content page and see what it's doing.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1619728232238.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12185i0C8D584A85E0839B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1619728232238.png" alt="jcarlson_1-1619728232238.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 20:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052915#M5994</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-29T20:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052945#M5995</link>
      <description>&lt;P&gt;That's true, I didn't realize that. Regardless, I'm showing only 32 items with 'authoritative' status when viewing Content under My Organization.&lt;BR /&gt;&lt;BR /&gt;That's interesting. I'm getting a Cross-Origin Request Blocked when clicking the 'Authoritative' filter.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;16:11:50.370 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at &lt;A href="https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/events" target="_blank"&gt;https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/events&lt;/A&gt;. (Reason: CORS request did not succeed).&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 21:16:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1052945#M5995</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-29T21:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053059#M5996</link>
      <description>&lt;LI-CODE lang="python"&gt;auth_items = [i for i in gis.content.search('', item_type='Feature Layer', max_items=-1) if i.content_status == 'org_authoritative' or i.content_status == 'public_authoritative']

auth_items&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bit less efficient, but you could just iterate over all Feature Layer items and look directly at the property in question.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 02:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053059#M5996</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-30T02:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053250#M5997</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Not sure why your first bit of code wasn't giving me the same results as the second bit of code. But after adding this parameter to the second bit I was able to get the desired results.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;query="owner:" + gis.users.me.username&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Apr 2021 16:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053250#M5997</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-30T16:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053257#M5998</link>
      <description>&lt;P&gt;I was signed as our org's admin user when I tested it. Perhaps that had some impact?&lt;/P&gt;&lt;P&gt;In any case, I'm glad you got it to return the results you want!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 16:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053257#M5998</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-30T16:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the content_status property 'authoritative' in an item search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053265#M5999</link>
      <description>&lt;P&gt;Perhaps? I was signed in as me. I haven't tried it as an admin. I'll keep that in mind!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 16:17:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-use-the-content-status-property/m-p/1053265#M5999</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-30T16:17:03Z</dc:date>
    </item>
  </channel>
</rss>

