<?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: REST API - Creating a Search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460679#M79527</link>
    <description>&lt;P&gt;I'm sending the request through postman &lt;BR /&gt;
below is what i am sending. .&lt;BR /&gt;
&lt;A href="https://splunk.xyx.net:8089/services/search/jobs?search=sourcetype=sp:wf_log"&gt;https://splunk.xyx.net:8089/services/search/jobs?search=sourcetype=sp:wf_log&lt;/A&gt; "IAV2testSubmissionDebug" "xyz_time" index=datacenter&lt;/P&gt;

&lt;P&gt;and above is the response i got with 200OK. &lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2020 01:47:19 GMT</pubDate>
    <dc:creator>kvmadan</dc:creator>
    <dc:date>2020-02-04T01:47:19Z</dc:date>
    <item>
      <title>REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460676#M79524</link>
      <description>&lt;P&gt;As mentioned in the documentation i am trying to create a search but I'm not getting the expected response. &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.1/RESTTUT/RESTsearches#Tips_on_accessing_searches"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.1/RESTTUT/RESTsearches#Tips_on_accessing_searches&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I'm getting below response. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;title&amp;gt;jobs&amp;lt;/title&amp;gt;
&amp;lt;id&amp;gt;https://xyz:8089/services/search/jobs&amp;lt;/id&amp;gt;
&amp;lt;updated&amp;gt;2020-02-03T06:11:04-08:00&amp;lt;/updated&amp;gt;
&amp;lt;generator build="7af3758d0d5e" version="7.3.3"/&amp;gt;
&amp;lt;author&amp;gt;
    &amp;lt;name&amp;gt;Splunk&amp;lt;/name&amp;gt;
&amp;lt;/author&amp;gt;
&amp;lt;opensearch:totalResults&amp;gt;0&amp;lt;/opensearch:totalResults&amp;gt;
&amp;lt;opensearch:itemsPerPage&amp;gt;0&amp;lt;/opensearch:itemsPerPage&amp;gt;
&amp;lt;opensearch:startIndex&amp;gt;0&amp;lt;/opensearch:startIndex&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As per the documentation, i am suppose to receive the sid. &lt;BR /&gt;
Can someone help, what is going wrong? &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 14:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460676#M79524</guid>
      <dc:creator>kvmadan</dc:creator>
      <dc:date>2020-02-03T14:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460677#M79525</link>
      <description>&lt;P&gt;Please share your curl command.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 21:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460677#M79525</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-02-03T21:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460678#M79526</link>
      <description>&lt;P&gt;Did you specify the search as show in that documentation page?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 22:30:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460678#M79526</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-02-03T22:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460679#M79527</link>
      <description>&lt;P&gt;I'm sending the request through postman &lt;BR /&gt;
below is what i am sending. .&lt;BR /&gt;
&lt;A href="https://splunk.xyx.net:8089/services/search/jobs?search=sourcetype=sp:wf_log"&gt;https://splunk.xyx.net:8089/services/search/jobs?search=sourcetype=sp:wf_log&lt;/A&gt; "IAV2testSubmissionDebug" "xyz_time" index=datacenter&lt;/P&gt;

&lt;P&gt;and above is the response i got with 200OK. &lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 01:47:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460679#M79527</guid>
      <dc:creator>kvmadan</dc:creator>
      <dc:date>2020-02-04T01:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460680#M79528</link>
      <description>&lt;P&gt;Are you GETing or POSTing?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 02:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460680#M79528</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-02-04T02:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460681#M79529</link>
      <description>&lt;P&gt;curl -XPOST -k &lt;A href="https://." target="test_blank"&gt;https://.&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 02:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460681#M79529</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-02-04T02:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460682#M79530</link>
      <description>&lt;P&gt;@kvmadan can you try the following REST API?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://xyz:8089/servicesNS/-/-/search/jobs" target="test_blank"&gt;https://xyz:8089/servicesNS/-/-/search/jobs&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;instead of &lt;CODE&gt;&lt;A href="https://xyz:8089/services/search/jobs" target="test_blank"&gt;https://xyz:8089/services/search/jobs&lt;/A&gt;&lt;/CODE&gt; and confirm?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 02:46:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460682#M79530</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-02-04T02:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460683#M79531</link>
      <description>&lt;P&gt;Thank you. I got it now, i think the search should start with search command.&lt;BR /&gt;
curl -XPOST -k &lt;A href="https://splunk.xyz.net:8089/services/search/jobs"&gt;https://splunk.xyz.net:8089/services/search/jobs&lt;/A&gt; -d search="&lt;STRONG&gt;search&lt;/STRONG&gt; host=datacenter* AND sourcetype=absd:log "IzV2xyzSubmissionDebug" "absd_time" index=datacenter"&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 03:05:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460683#M79531</guid>
      <dc:creator>kvmadan</dc:creator>
      <dc:date>2020-02-04T03:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460684#M79532</link>
      <description>&lt;P&gt;It doesnt work for me. &lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 03:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460684#M79532</guid>
      <dc:creator>kvmadan</dc:creator>
      <dc:date>2020-02-04T03:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460685#M79533</link>
      <description>&lt;P&gt;Another followup question.&lt;BR /&gt;
I'm able to submit the job but the results are empty once the job's &lt;STRONG&gt;dispatchstate&lt;/STRONG&gt; is DONE.&lt;BR /&gt;
the same search query, when i execute in the Splunk UI, it returns the results.&lt;BR /&gt;
I also treed limiting the results to last 24h by appending &lt;STRONG&gt;earliest=-24h&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Is there anything wrong i am doing?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 08:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460685#M79533</guid>
      <dc:creator>kvmadan</dc:creator>
      <dc:date>2020-02-04T08:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460686#M79534</link>
      <description>&lt;P&gt;Is your new problem related to knowledge object sharing/permissions and the API namespace you're using?&lt;/P&gt;

&lt;P&gt;For example, if your search works in "searching and reporting" app (aka "search") when ran as "username" but doesn't work in "launcher" app... or as another user in search app...&lt;/P&gt;

&lt;P&gt;You would use curl.... localhost:port/servicesNS/username/search&lt;/P&gt;

&lt;P&gt;If it only works for admin:&lt;/P&gt;

&lt;P&gt;/servicesNS/admin/search&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:15:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460686#M79534</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-02-04T10:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460687#M79535</link>
      <description>&lt;P&gt;I converted my comments to an answer, please accept if it helped.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460687#M79535</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-02-04T10:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Creating a Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460688#M79536</link>
      <description>&lt;P&gt;No, the search query can work in any app with admin/my user. &lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:19:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-Creating-a-Search/m-p/460688#M79536</guid>
      <dc:creator>kvmadan</dc:creator>
      <dc:date>2020-02-04T10:19:02Z</dc:date>
    </item>
  </channel>
</rss>

