<?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: Is there a method to provide the app context to a CLI export search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-method-to-provide-the-app-context-to-a-CLI-export/m-p/215429#M63140</link>
    <description>&lt;P&gt;Hi Lucas,&lt;/P&gt;

&lt;P&gt;This is where a bit of confusion lies in what you would think the parameter you are looking for is called and what it is actually called...&lt;/P&gt;

&lt;P&gt;The 'namespace' parameter will define the application context in which it is to run. Its definitely not clear in the REST endpoint doc but you can understand namespace here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTUM/RESTusing#Namespace"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTUM/RESTusing#Namespace&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Which you can then see is an available parameter to the REST endpoint you are calling:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTREF/RESTsearch#search.2Fjobs.2Fexport"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTREF/RESTsearch#search.2Fjobs.2Fexport&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Give it a shot and you should get your desired output.&lt;/P&gt;</description>
    <pubDate>Sat, 30 Apr 2016 15:09:14 GMT</pubDate>
    <dc:creator>joshd</dc:creator>
    <dc:date>2016-04-30T15:09:14Z</dc:date>
    <item>
      <title>Is there a method to provide the app context to a CLI export search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-method-to-provide-the-app-context-to-a-CLI-export/m-p/215428#M63139</link>
      <description>&lt;P&gt;Is there a method that I can provide the app context to a cli export search?&lt;/P&gt;

&lt;P&gt;I have a savedsearch called "GetLogins" which is in the app "myapp". I don't want to make it global as all the field extractions etc are inside that app.&lt;/P&gt;

&lt;P&gt;My guessed curl command is :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme &lt;A href="https://mysplunk:8089/services/search/jobs/export" target="test_blank"&gt;https://mysplunk:8089/services/search/jobs/export&lt;/A&gt; --data-urlencode  search='| savedsearch GetLogins' -d output_mode=raw -d earliest_time=-1d@d -d latest_time=@d -d app=myapp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The param "app" doesn't work. Is there anyway I can pass an app context to the search? Normally in a url there would be the app context but for the export command there is no &lt;CODE&gt;/services/app/myapp/search/jobs/export&lt;/CODE&gt; (or similar) path that I can find.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 01:41:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-method-to-provide-the-app-context-to-a-CLI-export/m-p/215428#M63139</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2016-04-27T01:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a method to provide the app context to a CLI export search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-method-to-provide-the-app-context-to-a-CLI-export/m-p/215429#M63140</link>
      <description>&lt;P&gt;Hi Lucas,&lt;/P&gt;

&lt;P&gt;This is where a bit of confusion lies in what you would think the parameter you are looking for is called and what it is actually called...&lt;/P&gt;

&lt;P&gt;The 'namespace' parameter will define the application context in which it is to run. Its definitely not clear in the REST endpoint doc but you can understand namespace here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTUM/RESTusing#Namespace"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTUM/RESTusing#Namespace&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Which you can then see is an available parameter to the REST endpoint you are calling:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTREF/RESTsearch#search.2Fjobs.2Fexport"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.0/RESTREF/RESTsearch#search.2Fjobs.2Fexport&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Give it a shot and you should get your desired output.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 15:09:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-method-to-provide-the-app-context-to-a-CLI-export/m-p/215429#M63140</guid>
      <dc:creator>joshd</dc:creator>
      <dc:date>2016-04-30T15:09:14Z</dc:date>
    </item>
  </channel>
</rss>

