<?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 Using Splunk API to remove agents from deployment server in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447431#M15722</link>
    <description>&lt;P&gt;We have an asset database that keeps track of decommissioned assets. We can make a table of all decommissioned assets in our environment. Is there a way to use the REST API to remove those assets from the deployment server. &lt;/P&gt;

&lt;P&gt;Something like: &lt;BR /&gt;
"Status="end of life"| foreach AssetName rest DELETE &lt;A href="https://localhost:8089/services/deployment/server/clients/AssetName"&gt;https://localhost:8089/services/deployment/server/clients/AssetName&lt;/A&gt;"&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 18:42:57 GMT</pubDate>
    <dc:creator>cameronr0705</dc:creator>
    <dc:date>2019-06-24T18:42:57Z</dc:date>
    <item>
      <title>Using Splunk API to remove agents from deployment server</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447431#M15722</link>
      <description>&lt;P&gt;We have an asset database that keeps track of decommissioned assets. We can make a table of all decommissioned assets in our environment. Is there a way to use the REST API to remove those assets from the deployment server. &lt;/P&gt;

&lt;P&gt;Something like: &lt;BR /&gt;
"Status="end of life"| foreach AssetName rest DELETE &lt;A href="https://localhost:8089/services/deployment/server/clients/AssetName"&gt;https://localhost:8089/services/deployment/server/clients/AssetName&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 18:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447431#M15722</guid>
      <dc:creator>cameronr0705</dc:creator>
      <dc:date>2019-06-24T18:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Splunk API to remove agents from deployment server</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447432#M15723</link>
      <description>&lt;P&gt;You have the right idea, but POST and DELETE operations cannot be performed from a search.  You'll have to write a script that reads your list of decommissioned assets and sends the REST commands to Splunk using curl or similar.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 20:56:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447432#M15723</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-06-24T20:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Splunk API to remove agents from deployment server</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447433#M15724</link>
      <description>&lt;P&gt;You could install an app like &lt;A href="https://splunkbase.splunk.com/app/4146/"&gt;https://splunkbase.splunk.com/app/4146/&lt;/A&gt; and use the | curl method=delete option, it will involve a few tricks and most likely you would want a | map to run the curl command many times.&lt;/P&gt;

&lt;P&gt;You might need to apply this &lt;A href="https://answers.splunk.com/answers/738867/web-tools-add-on-ta-webtools-curl-command-throws-a.html"&gt;fix&lt;/A&gt; if installing version 1.2.3 for the TA webtools.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 22:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-Splunk-API-to-remove-agents-from-deployment-server/m-p/447433#M15724</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2019-06-27T22:58:19Z</dc:date>
    </item>
  </channel>
</rss>

