<?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: How can I create a search via the REST API in a specific app? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365473#M66534</link>
    <description>&lt;P&gt;I believe you need to pass &lt;CODE&gt;namespace&lt;/CODE&gt; request parameters in your POST job. The base URL should stay the same. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTsearch#POST_search.2Fjobs_method_detail"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTsearch#POST_search.2Fjobs_method_detail&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Name    namespace   
Type    String      
Default 
Description       The application namespace in which to restrict searches.
The namespace corresponds to the identifier recognized in the /services/apps/local endpoint.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 May 2017 20:37:54 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-05-05T20:37:54Z</dc:date>
    <item>
      <title>How can I create a search via the REST API in a specific app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365472#M66533</link>
      <description>&lt;P&gt;I am trying to perform a search to modify a lookup csv via the REST API.&lt;/P&gt;

&lt;P&gt;The simple search &lt;BR /&gt;
&lt;CODE&gt;|inputlookup filename.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;when performed via the Web UI the URL for the search would be&lt;BR /&gt;
&lt;CODE&gt;&lt;A href="https://mysplunk.com/en-US/app/custom_app_name/search?q=%7Cinputlookup%filename.csv" target="_blank"&gt;https://mysplunk.com/en-US/app/custom_app_name/search?q=%7Cinputlookup%filename.csv&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;However, I cannot figure out how to target custom_app_name when creating a search via the API. In the past I've created searches against the search app with a POST request to the URL&lt;BR /&gt;
&lt;CODE&gt;&lt;A href="https://mysplunk.com:8089/services/search/jobs?output_mode=json" target="_blank"&gt;https://mysplunk.com:8089/services/search/jobs?output_mode=json&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Can anyone help me understand what the base URL should look like for interacting with searches performed against custom_app_name?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365472#M66533</guid>
      <dc:creator>ericturpin</dc:creator>
      <dc:date>2020-09-29T13:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a search via the REST API in a specific app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365473#M66534</link>
      <description>&lt;P&gt;I believe you need to pass &lt;CODE&gt;namespace&lt;/CODE&gt; request parameters in your POST job. The base URL should stay the same. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTsearch#POST_search.2Fjobs_method_detail"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTsearch#POST_search.2Fjobs_method_detail&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Name    namespace   
Type    String      
Default 
Description       The application namespace in which to restrict searches.
The namespace corresponds to the identifier recognized in the /services/apps/local endpoint.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 May 2017 20:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365473#M66534</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-05T20:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a search via the REST API in a specific app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365474#M66535</link>
      <description>&lt;P&gt;I tried the solution suggested by @somesoni2 and didn't have any success. But the term namespace in my searching helped me find the solution here: &lt;A href="https://answers.splunk.com/answers/316/rest-api-with-namespace.html#answer-323"&gt;https://answers.splunk.com/answers/316/rest-api-with-namespace.html#answer-323&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So my POST should go to &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;A href="https://mysplunk.com:8089/servicesNS/MY_USERNAME/custom_app_name/search/jobs" target="test_blank"&gt;https://mysplunk.com:8089/servicesNS/MY_USERNAME/custom_app_name/search/jobs&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 20:41:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365474#M66535</guid>
      <dc:creator>ericturpin</dc:creator>
      <dc:date>2017-05-05T20:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a search via the REST API in a specific app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365475#M66536</link>
      <description>&lt;P&gt;@ericturpin - Glad you were able to find the solution you were looking for. Please don't forget to click "Accept" below your answer in order to resolve your post so others can easily find it. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2017 22:43:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-create-a-search-via-the-REST-API-in-a-specific-app/m-p/365475#M66536</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-05-05T22:43:12Z</dc:date>
    </item>
  </channel>
</rss>

