<?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 How do you change apps in in the API (Java)? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-change-apps-in-in-the-API-Java/m-p/301437#M56962</link>
    <description>&lt;P&gt;So I am following the Java Splunk API tutorials and Can list apps and saved searches but for the life of me I cannot figure out how to get saved searches per app.&lt;/P&gt;

&lt;P&gt;This is what I have but it defaults to the main app and not the app I am trying to look for.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Collection&amp;lt;SavedSearch&amp;gt; savedSearches = service.getApplications().get("a_different_app").getService().getSavedSearches().values();
    for (SavedSearch ss: savedSearches){
        System.out.println(ss.getName());
    }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As you can see I am trying to go to a different app other than the default "Search &amp;amp; Reporting" so I tried that on from this one below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Collection&amp;lt;SavedSearch&amp;gt; savedSearches = service.getSavedSearches().values();
    for (SavedSearch ss: savedSearches){
        System.out.println(ss.getName());
    }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both codes above prints out the saved searched for the "Search &amp;amp; Reporting".&lt;/P&gt;

&lt;P&gt;Can anyone help with printing the searches from certain apps and then run said search from that app?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 14:18:29 GMT</pubDate>
    <dc:creator>scottq</dc:creator>
    <dc:date>2018-04-03T14:18:29Z</dc:date>
    <item>
      <title>How do you change apps in in the API (Java)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-change-apps-in-in-the-API-Java/m-p/301437#M56962</link>
      <description>&lt;P&gt;So I am following the Java Splunk API tutorials and Can list apps and saved searches but for the life of me I cannot figure out how to get saved searches per app.&lt;/P&gt;

&lt;P&gt;This is what I have but it defaults to the main app and not the app I am trying to look for.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Collection&amp;lt;SavedSearch&amp;gt; savedSearches = service.getApplications().get("a_different_app").getService().getSavedSearches().values();
    for (SavedSearch ss: savedSearches){
        System.out.println(ss.getName());
    }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As you can see I am trying to go to a different app other than the default "Search &amp;amp; Reporting" so I tried that on from this one below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Collection&amp;lt;SavedSearch&amp;gt; savedSearches = service.getSavedSearches().values();
    for (SavedSearch ss: savedSearches){
        System.out.println(ss.getName());
    }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both codes above prints out the saved searched for the "Search &amp;amp; Reporting".&lt;/P&gt;

&lt;P&gt;Can anyone help with printing the searches from certain apps and then run said search from that app?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 14:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-change-apps-in-in-the-API-Java/m-p/301437#M56962</guid>
      <dc:creator>scottq</dc:creator>
      <dc:date>2018-04-03T14:18:29Z</dc:date>
    </item>
  </channel>
</rss>

