<?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: Mark data item as &amp;quot;Authoritative&amp;quot; with API for Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713099#M80</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code should&amp;nbsp;do the trick if you are using the latest Python API, version 1.5.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
gis&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"username"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item1&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;item ID&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# content_status accept "authoritative","deprecated" or None&lt;/SPAN&gt;
item1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content_status&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"authoritative"&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:32:56 GMT</pubDate>
    <dc:creator>simoxu</dc:creator>
    <dc:date>2021-12-12T06:32:56Z</dc:date>
    <item>
      <title>Mark data item as "Authoritative" with API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713097#M78</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to access and set the property "authoritative"&amp;nbsp; on data items in AGOL to "Yes" through the API or has this not been implemented yet? I am bulk creating "authoritative" services with a script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 09:22:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713097#M78</guid>
      <dc:creator>MortenBjerrum1</dc:creator>
      <dc:date>2018-08-24T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Mark data item as "Authoritative" with API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713098#M79</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Morten,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think the API support making items "&lt;SPAN style="background-color: #ffffff;"&gt;authoritative&lt;/SPAN&gt;" yet. But you can use the API to get the id's then use the requests module to hit the endpoint and make the item authoritative. Here is an example...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; requests


gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'username'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'password'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

featureLayerItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Your item id here'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
r &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;post&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F" target="_blank"&gt;https://&lt;/A&gt;&lt;SPAN&gt;{0}/sharing/rest/content/items/{1}/setContentStatus'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Your org domain here'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;featureLayerItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; data&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'status'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'org_authoritative'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'clearEmptyFields'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'false'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'f'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'json'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'token'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Your token here'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to put in your organizations domain and also you will need to get a token so that you can pass it with the request. This &lt;A href="https://developers.arcgis.com/labs/rest/get-an-access-token/" rel="nofollow noopener noreferrer" target="_blank"&gt;documentation &lt;/A&gt;shows how you can get a token using python.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713098#M79</guid>
      <dc:creator>MunachisoOgbuchiekwe</dc:creator>
      <dc:date>2021-12-12T06:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Mark data item as "Authoritative" with API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713099#M80</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code should&amp;nbsp;do the trick if you are using the latest Python API, version 1.5.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
gis&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"username"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item1&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;item ID&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# content_status accept "authoritative","deprecated" or None&lt;/SPAN&gt;
item1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content_status&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"authoritative"&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:32:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713099#M80</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2021-12-12T06:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Mark data item as "Authoritative" with API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713100#M81</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this is the answer, can you please mark it as the "correct answer"? by doing so it will appear at the top and help people with same question to find the correct answer quicker. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2018 06:17:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713100#M81</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-08-28T06:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mark data item as "Authoritative" with API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713101#M82</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the answer. I just needed to check it, but it was correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Morten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2018 07:26:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mark-data-item-as-quot-authoritative-quot-with-api/m-p/713101#M82</guid>
      <dc:creator>MortenBjerrum1</dc:creator>
      <dc:date>2018-08-28T07:26:38Z</dc:date>
    </item>
  </channel>
</rss>

