<?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: Python SDK Saved Search Variable Passing in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562117#M9611</link>
    <description>&lt;P&gt;Passing this returns that the value "state" is not supported by this handler.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 17:16:15 GMT</pubDate>
    <dc:creator>caden00</dc:creator>
    <dc:date>2021-08-04T17:16:15Z</dc:date>
    <item>
      <title>Python SDK Saved Search Variable Passing</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562109#M9602</link>
      <description>&lt;P&gt;I am using Python to access and saved search. I want to then run this saved search.&amp;nbsp; I understand how to do this using the .dispatch method. The issue I am having is that I have a search with search variables, for example&lt;/P&gt;&lt;P&gt;| eval state="$state$"&lt;/P&gt;&lt;P&gt;Using SPL I simply call&lt;/P&gt;&lt;P&gt;| savedsearch "somesearch" state="state"&lt;/P&gt;&lt;P&gt;In Python I have seen with JS you can pass&lt;/P&gt;&lt;P&gt;{state: somestate}&lt;/P&gt;&lt;P&gt;in the .dispatch() method.&lt;/P&gt;&lt;P&gt;In Python however, any time I attempt to pass a parameter with these values I get various errors. Any help in the direction of passing a variable name would be great!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 16:18:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562109#M9602</guid>
      <dc:creator>caden00</dc:creator>
      <dc:date>2021-08-04T16:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Saved Search Variable Passing</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562111#M9603</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237138"&gt;@caden00&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;kwargs = {"state": "state"}
job = mysavedsearch.dispatch(**kwargs)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KV&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 16:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562111#M9603</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-08-04T16:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Saved Search Variable Passing</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562117#M9611</link>
      <description>&lt;P&gt;Passing this returns that the value "state" is not supported by this handler.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 17:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562117#M9611</guid>
      <dc:creator>caden00</dc:creator>
      <dc:date>2021-08-04T17:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Saved Search Variable Passing</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562190#M9612</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237138"&gt;@caden00&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;kwargs = {"args.state": "state"}
job = mysavedsearch.dispatch(**kwargs)&lt;/LI-CODE&gt;&lt;P&gt;KV&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 06:51:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Python-SDK-Saved-Search-Variable-Passing/m-p/562190#M9612</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-08-05T06:51:14Z</dc:date>
    </item>
  </channel>
</rss>

