<?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 Splunk using rest api to fetch app name / id in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405165#M71921</link>
    <description>&lt;P&gt;Hello fellow Splunkers,&lt;/P&gt;

&lt;P&gt;I am using the following query to fetch the splunk app name in standalone search head -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/search/jobs splunk_server=local 
| addinfo 
| where sid = info_sid 
| rename eai:acl.app as app_name
| fields + app_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, this same query is not working in SHC. It shows &lt;EM&gt;No results found&lt;/EM&gt;&lt;BR /&gt;
Any suggestions would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 13:21:28 GMT</pubDate>
    <dc:creator>Dawson014</dc:creator>
    <dc:date>2018-06-27T13:21:28Z</dc:date>
    <item>
      <title>Splunk using rest api to fetch app name / id</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405165#M71921</link>
      <description>&lt;P&gt;Hello fellow Splunkers,&lt;/P&gt;

&lt;P&gt;I am using the following query to fetch the splunk app name in standalone search head -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/search/jobs splunk_server=local 
| addinfo 
| where sid = info_sid 
| rename eai:acl.app as app_name
| fields + app_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, this same query is not working in SHC. It shows &lt;EM&gt;No results found&lt;/EM&gt;&lt;BR /&gt;
Any suggestions would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405165#M71921</guid>
      <dc:creator>Dawson014</dc:creator>
      <dc:date>2018-06-27T13:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk using rest api to fetch app name / id</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405166#M71922</link>
      <description>&lt;P&gt;Hi @Dawson014,&lt;BR /&gt;
Try running just &lt;CODE&gt;| rest /services/search/jobs&lt;/CODE&gt; and see if it works&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405166#M71922</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-27T13:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk using rest api to fetch app name / id</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405167#M71923</link>
      <description>&lt;P&gt;Tried this, worked once. Then again the same &lt;EM&gt;No Results founds&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405167#M71923</guid>
      <dc:creator>Dawson014</dc:creator>
      <dc:date>2018-06-27T13:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk using rest api to fetch app name / id</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405168#M71924</link>
      <description>&lt;P&gt;If you're running the query on a dashboard then this should work -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_query&amp;gt;
| eval app_name = $env:app$
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, this will not work if you are running the query on a search panel.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 10:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405168#M71924</guid>
      <dc:creator>sdawsonkg</dc:creator>
      <dc:date>2018-07-20T10:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk using rest api to fetch app name / id</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405169#M71925</link>
      <description>&lt;P&gt;This will do. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 10:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405169#M71925</guid>
      <dc:creator>Dawson014</dc:creator>
      <dc:date>2018-07-20T10:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk using rest api to fetch app name / id</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405170#M71926</link>
      <description>&lt;P&gt;Good. Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 10:57:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-using-rest-api-to-fetch-app-name-id/m-p/405170#M71926</guid>
      <dc:creator>sdawsonkg</dc:creator>
      <dc:date>2018-07-20T10:57:48Z</dc:date>
    </item>
  </channel>
</rss>

