<?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: Can REST API be used to execute a python script on Splunk server? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329951#M61174</link>
    <description>&lt;P&gt;Are you looking for something like this&lt;BR /&gt;
&lt;A href="https://wiki.splunk.com/Community:40GUIDevelopment"&gt;https://wiki.splunk.com/Community:40GUIDevelopment&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 11:13:22 GMT</pubDate>
    <dc:creator>paramagurukarth</dc:creator>
    <dc:date>2019-05-28T11:13:22Z</dc:date>
    <item>
      <title>Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329945#M61168</link>
      <description>&lt;P&gt;Could we add a custom python script on our Splunk server and have it executed from a client using the Splunk REST API?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 21:34:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329945#M61168</guid>
      <dc:creator>simpkins1958</dc:creator>
      <dc:date>2017-04-13T21:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329946#M61169</link>
      <description>&lt;P&gt;Yes! One way to do this is with a custom search command. Let's say your python script is called "testscript". You could rewrite as (or call it from) a Python script that Splunk recognizes as a custom search command, and then you could execute it as a Splunk search like this: "| testscript". Then you could call that search (adding arguments as needed) using the Splunk REST API.&lt;/P&gt;

&lt;P&gt;Here's a link that explains how to create custom search commands: &lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEU2"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAEU2&lt;/A&gt;&lt;BR /&gt;
Here's the basic documentation on running a search from Python using Splunk's REST API: &lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEE5"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAEE5&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 00:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329946#M61169</guid>
      <dc:creator>jonmargulies</dc:creator>
      <dc:date>2017-04-14T00:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329947#M61170</link>
      <description>&lt;P&gt;Yes you can do that. One of the way is Modular Inputs.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 04:59:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329947#M61170</guid>
      <dc:creator>hardikJsheth</dc:creator>
      <dc:date>2017-04-14T04:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329948#M61171</link>
      <description>&lt;P&gt;Guys,&lt;BR /&gt;
why this &lt;STRONG&gt;does not work&lt;/STRONG&gt; from a Linux myServer2?&lt;BR /&gt;
curl -k -u 'myUser:myPwd' &lt;A href="https://myServer1:8089/services/search/jobs/export"&gt;https://myServer1:8089/services/search/jobs/export&lt;/A&gt; -d search=" | makeresults | myScript " -d output_mode=csv&lt;/P&gt;

&lt;P&gt;But OK for search = " | makeresults | eval myVal=777 "&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 13:49:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329948#M61171</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2019-05-23T13:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329949#M61172</link>
      <description>&lt;P&gt;Again. So poor support here...&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 08:26:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329949#M61172</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2019-05-28T08:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329950#M61173</link>
      <description>&lt;P&gt;SOLVED for similar case&lt;BR /&gt;
"Error when I run custom Python script from one server to another sever using cURL (Search Factory: Unknown search command)"&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/747926/error-when-i-run-custom-python-script-from-one-ser.html?childToView=748251#answer-748251"&gt;https://answers.splunk.com/answers/747926/error-when-i-run-custom-python-script-from-one-ser.html?childToView=748251#answer-748251&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 09:08:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329950#M61173</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2019-05-28T09:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a python script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329951#M61174</link>
      <description>&lt;P&gt;Are you looking for something like this&lt;BR /&gt;
&lt;A href="https://wiki.splunk.com/Community:40GUIDevelopment"&gt;https://wiki.splunk.com/Community:40GUIDevelopment&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 11:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-python-script-on-Splunk-server/m-p/329951#M61174</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2019-05-28T11:13:22Z</dc:date>
    </item>
  </channel>
</rss>

