<?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: Get action.script using REST/SDK in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118669#M31717</link>
    <description>&lt;P&gt;Yes! I tried. But I didn't get any output.&lt;BR /&gt;
|rest/servicesNS/* /* /saved/searches/* | fields title action.script action.script.filename |&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jun 2014 21:26:35 GMT</pubDate>
    <dc:creator>mchappidi</dc:creator>
    <dc:date>2014-06-26T21:26:35Z</dc:date>
    <item>
      <title>Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118661#M31709</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Is there any way to get action.script/action.script.filename from searches/jobs using REST/SDK?&lt;BR /&gt;
I am aware, we can get from savedsearches. &lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 21:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118661#M31709</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-24T21:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118662#M31710</link>
      <description>&lt;P&gt;No, the search/jobs endpoint doesn't provide that info. You'd have to take the report's ID built from the label, user, and app returned by search/jobs and look at the saved/searches endpoint as you found out already &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Take a look at this example to illustrate:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/search/jobs search="isSavedSearch=1" | rename eai:acl.app as app | fields author app label sid | map search="rest /servicesNS/$author$/$app$/saved/searches/$label$ | fields title action.script action.script.filename | eval sid=\"$sid$\""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Jun 2014 09:14:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118662#M31710</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-26T09:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118663#M31711</link>
      <description>&lt;P&gt;Thanks for the immediate reply. I understood the logic.&lt;BR /&gt;
But I got the following error:&lt;BR /&gt;
"The search result count (354) exceeds maximum (10), using max. To override it, set maxsearches appropriately."&lt;/P&gt;

&lt;P&gt;I'm new to splunk search. Any help would be great.&lt;BR /&gt;
Thank you again!!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 15:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118663#M31711</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-26T15:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118664#M31712</link>
      <description>&lt;P&gt;By default the &lt;CODE&gt;map&lt;/CODE&gt; command will only execute ten searches, see &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/SearchReference/map"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.1/SearchReference/map&lt;/A&gt; for reference. Add &lt;CODE&gt;maxsearches=0&lt;/CODE&gt; to disable the maximum entirely.&lt;/P&gt;

&lt;P&gt;Consider filtering before the map, for example by app or search name - unless you want to see all 354 entries.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 15:56:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118664#M31712</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-26T15:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118665#M31713</link>
      <description>&lt;P&gt;yes, I did that. But it is returning "None"/No Results found.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 18:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118665#M31713</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-26T18:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118666#M31714</link>
      <description>&lt;P&gt;Heh, it appears &lt;CODE&gt;map&lt;/CODE&gt; may not like &lt;CODE&gt;maxsearches=0&lt;/CODE&gt; for an infinite number of searches, try setting it to 1000 instead.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 18:20:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118666#M31714</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-26T18:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118667#M31715</link>
      <description>&lt;P&gt;I did for 500. But no result.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 18:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118667#M31715</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-26T18:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118668#M31716</link>
      <description>&lt;P&gt;Does running a single REST call for a saved search work based on values taken from the jobs call manually?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 19:00:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118668#M31716</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-26T19:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118669#M31717</link>
      <description>&lt;P&gt;Yes! I tried. But I didn't get any output.&lt;BR /&gt;
|rest/servicesNS/* /* /saved/searches/* | fields title action.script action.script.filename |&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 21:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118669#M31717</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-26T21:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118670#M31718</link>
      <description>&lt;P&gt;I don't think wildcards work there.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2014 22:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118670#M31718</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-26T22:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118671#M31719</link>
      <description>&lt;P&gt;I hard-coded "author","app" and "label". I just mentioned as wildcard. Is this right way to collect from savedsearch ? Any example provided helps a lot. &lt;BR /&gt;
Thank you again!!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118671#M31719</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-27T15:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118672#M31720</link>
      <description>&lt;P&gt;The search I posted is a working example over here, so posting another doesn't seem useful to me.&lt;/P&gt;

&lt;P&gt;Instead, you should work your way to what's going wrong on your end. Start with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/saved/searches
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should list all your saved searches. Then add a user and the app:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /servicesNS/user/app/saved/searches
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should list saved searches in that app. Then you add a saved search label to the end, and you should get details for that saved search. Confirm that's returned by the jobs call if it's a scheduled search.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:29:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118672#M31720</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-27T15:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118673#M31721</link>
      <description>&lt;P&gt;Yes! But "isSavedSearch=1"  count(360) doesn't match with "|rest /services/saved/searches" count(90).&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118673#M31721</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-27T15:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118674#M31722</link>
      <description>&lt;P&gt;Doesn't match how?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 16:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118674#M31722</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-27T16:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Get action.script using REST/SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118675#M31723</link>
      <description>&lt;P&gt;That's issue. So I am not able to pick them in map searching!!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 17:17:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-action-script-using-REST-SDK/m-p/118675#M31723</guid>
      <dc:creator>mchappidi</dc:creator>
      <dc:date>2014-06-27T17:17:19Z</dc:date>
    </item>
  </channel>
</rss>

