<?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: Delete ArcGIS Server services en masse? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665024#M25373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any Python will do, though if you have more than the default urllib it will likely be easier.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Dec 2017 01:16:37 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2017-12-01T01:16:37Z</dc:date>
    <item>
      <title>Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665018#M25367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say we've got, you know, 8 pages of services that need to be removed. That's time consuming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there ways to programmatically remove services much faster than through the GUI in Manager?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(other ways to programmatically / through scripts alter a large number of services would also be of interest, such as starting/stopping/changing pooling or other options)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Installation is ArcGIS Server 10.5 on Linux.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Update*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This question was posed because the documentation here says only two options (Manager or ArcMap):&lt;BR /&gt;&lt;A class="link-titled" href="http://server.arcgis.com/en/server/latest/publish-services/linux/deleting-a-service.htm" title="http://server.arcgis.com/en/server/latest/publish-services/linux/deleting-a-service.htm"&gt;Delete a service—Documentation | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However&amp;nbsp;Vince here, reminded me of the ArcGIS Rest API. Among other tasks and features, it does mention how to Delete Service through a POST with an admin token here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Delete_Service/02r3000001zq000000/" title="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Delete_Service/02r3000001zq000000/"&gt;ArcGIS REST API&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I consider this question somewhat resolved, though would keep open out of interest to hear other ways people address managing services programmatically in their organization (custom scripts, etc.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 21:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665018#M25367</guid>
      <dc:creator>CassandraFollett</dc:creator>
      <dc:date>2017-11-30T21:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665019#M25368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are code samples for using Python to call the REST API.&amp;nbsp; You need to get a token first.&lt;BR /&gt;I don't have my source handy at the moment, but it isn't more than a score or two lines of&lt;/P&gt;&lt;P&gt;actual code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 21:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665019#M25368</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2017-11-30T21:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665020#M25369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So basically you're running that through ArcMap / ArcGIS Pro python interpreter in that case...?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 21:43:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665020#M25369</guid>
      <dc:creator>CassandraFollett</dc:creator>
      <dc:date>2017-11-30T21:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665021#M25370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if your code was going to involve ArcMap / ArcGIS Pro or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, mentioning the REST API had me look for the ArcGIS REST API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that Delete Folder and Delete Service (along with many other tasks and requests) are capable of doing through a URL with administrator token, like so:&amp;nbsp;&lt;BR /&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Delete_Folder/02r3000001s1000000/" title="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Delete_Folder/02r3000001s1000000/"&gt;ArcGIS REST API&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is probably the answer I am looking for.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 21:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665021#M25370</guid>
      <dc:creator>CassandraFollett</dc:creator>
      <dc:date>2017-11-30T21:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665022#M25371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you just create an admin connection in ArcCatalog and select multiple and erase them there. I&amp;nbsp;&lt;EM&gt;think&lt;/EM&gt; that would work??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 21:58:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665022#M25371</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2017-11-30T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665023#M25372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcMap and ArcCatalog aren't actually in my workflow, so I wanted to avoid having to boot up desktop applications to manage services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I think Vince might have been referring to using Python within ArcMap to call the REST API, but that made me remember that I don't need a client at all to do this... so I just successfully deleted the folder with all 8 pages with a token and POST... That's a solution that keeps me happy &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 22:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665023#M25372</guid>
      <dc:creator>CassandraFollett</dc:creator>
      <dc:date>2017-11-30T22:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete ArcGIS Server services en masse?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665024#M25373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any Python will do, though if you have more than the default urllib it will likely be easier.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 01:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/delete-arcgis-server-services-en-masse/m-p/665024#M25373</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2017-12-01T01:16:37Z</dc:date>
    </item>
  </channel>
</rss>

