<?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: Pass JSON or XML as parameters to custom Python script via Splunk REST API in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498407#M194884</link>
    <description>&lt;P&gt;Could you provide more clarity on this? Are you trying to implement a custom REST endpoint?&lt;/P&gt;</description>
    <pubDate>Sun, 08 Dec 2019 19:46:19 GMT</pubDate>
    <dc:creator>arjunpkishore5</dc:creator>
    <dc:date>2019-12-08T19:46:19Z</dc:date>
    <item>
      <title>Pass JSON or XML as parameters to custom Python script via Splunk REST API</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498406#M194883</link>
      <description>&lt;P&gt;Hey guys,&lt;BR /&gt;
How to &lt;BR /&gt;
Pass JSON or XML as parameters to custom Python script via Splunk REST API ?&lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
I use REST API like this &lt;BR /&gt;
curl -ku MyUser:MyPwd &lt;A href="https://MyServer:8089/services/search/jobs/export?output_mode=json"&gt;https://MyServer:8089/services/search/jobs/export?output_mode=json&lt;/A&gt; -d search=' | MyScript param1 param2 '&lt;/P&gt;

&lt;P&gt;What if I want these parameters&lt;BR /&gt;
param1 ="JonSnow"&lt;BR /&gt;
param1 ="[{\"name\":\"Ned\",\"house\":\"Stark\"}]&lt;/P&gt;

&lt;P&gt;Version 6.5.2 or 7+ of Splunk.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 19:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498406#M194883</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2019-12-08T19:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Pass JSON or XML as parameters to custom Python script via Splunk REST API</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498407#M194884</link>
      <description>&lt;P&gt;Could you provide more clarity on this? Are you trying to implement a custom REST endpoint?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 19:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498407#M194884</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T19:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pass JSON or XML as parameters to custom Python script via Splunk REST API</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498408#M194885</link>
      <description>&lt;P&gt;Hi, I've updated the question. Please take a look.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 20:03:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498408#M194885</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2019-12-08T20:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pass JSON or XML as parameters to custom Python script via Splunk REST API</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498409#M194886</link>
      <description>&lt;P&gt;Still doesn't make sense. Is you script hosted as a custom REST Endpoint ?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 20:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498409#M194886</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-12-08T20:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pass JSON or XML as parameters to custom Python script via Splunk REST API</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498410#M194887</link>
      <description>&lt;P&gt;It's just a custom script on my server that runs several Splunk searches. I want to pass not only alphanumeric parameters, but a json package to my searches to be used in alerting rules.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 20:23:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/498410#M194887</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2019-12-08T20:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pass JSON or XML as parameters to custom Python script via Splunk REST API</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/530292#M194888</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Solved long time ago. This is standart: passing smth like JSON thru REST API is just passing a string parameter for a custom Python script (when calling via REST API a search like " | myScript arg1=\"aaa\" arg2=\"bbb\" "&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 15:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pass-JSON-or-XML-as-parameters-to-custom-Python-script-via/m-p/530292#M194888</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2020-11-21T15:31:16Z</dc:date>
    </item>
  </channel>
</rss>

