<?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: Batch delete items using ArcGIS Python API in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037901#M38982</link>
    <description>&lt;P&gt;It's actually part of the &lt;STRONG&gt;query&lt;/STRONG&gt; string, details of which &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" target="_self"&gt;you can find here&lt;/A&gt;.&lt;/P&gt;&lt;PRE&gt;fgdb_list = gis.content.search(query="owner:my-username", item_type='File Geodatabase', max_items=-1)&lt;/PRE&gt;</description>
    <pubDate>Thu, 18 Mar 2021 01:40:56 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-03-18T01:40:56Z</dc:date>
    <item>
      <title>Batch delete items using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1036204#M38926</link>
      <description>&lt;P&gt;I'm trying to batch delete contents in ArcGIS Online. For example, when users export a feature service to File Geodatabase, there will be a geodatabase object in ArcGIS online before downloading to local folders. I wonder if I can write a script to delete all the file geodatabase objects. I know how to delete a single item using the API like item.delete(). But I don't know how to delete items in a bulk.&lt;/P&gt;&lt;P&gt;I appreciate your help!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 00:38:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1036204#M38926</guid>
      <dc:creator>RachelBu</dc:creator>
      <dc:date>2021-03-13T00:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Batch delete items using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1036229#M38929</link>
      <description>&lt;P&gt;There is a function &lt;STRONG&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=delete#arcgis.gis.ContentManager.delete_items" target="_self"&gt;delete_items()&lt;/A&gt; &lt;/STRONG&gt;that is part of the ContentManager class. Use it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gis = arcgis.GIS('url', 'user', 'pw')

fgdb_list = gis.content.search('', item_type='File Geodatabase', max_items=-1)

gis.content.delete_items(fgdb_list)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 03:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1036229#M38929</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-13T03:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Batch delete items using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037871#M38981</link>
      <description>&lt;P&gt;If I want to delete item created by me only. How do I set the owner parameter in the script? The search function doesn't seem to have a parameter like item owner.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 23:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037871#M38981</guid>
      <dc:creator>RachelBu</dc:creator>
      <dc:date>2021-03-17T23:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Batch delete items using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037901#M38982</link>
      <description>&lt;P&gt;It's actually part of the &lt;STRONG&gt;query&lt;/STRONG&gt; string, details of which &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" target="_self"&gt;you can find here&lt;/A&gt;.&lt;/P&gt;&lt;PRE&gt;fgdb_list = gis.content.search(query="owner:my-username", item_type='File Geodatabase', max_items=-1)&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Mar 2021 01:40:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037901#M38982</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-18T01:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Batch delete items using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037924#M38984</link>
      <description>&lt;P&gt;Thank you so much, Josh!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 06:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-delete-items-using-arcgis-python-api/m-p/1037924#M38984</guid>
      <dc:creator>RachelBu</dc:creator>
      <dc:date>2021-03-18T06:04:06Z</dc:date>
    </item>
  </channel>
</rss>

