<?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: Why is | rest command not returning any data where CURL works? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/601631#M209382</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149908"&gt;@eregon&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you figure this one out?&amp;nbsp; I'm having the same issue with one of the instances I look after.&lt;/P&gt;&lt;P&gt;Can curl OK - but get nothing when trying to run | rest command from SPL.&lt;/P&gt;&lt;P&gt;Have not seen this issue before - haven't been able to determine the cause as yet.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 02:37:41 GMT</pubDate>
    <dc:creator>MKozanic</dc:creator>
    <dc:date>2022-06-14T02:37:41Z</dc:date>
    <item>
      <title>Why is | rest command not returning any data where CURL works?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/591208#M205825</link>
      <description>&lt;P&gt;Good morning fellow Splunkthiasts!&lt;/P&gt;
&lt;P&gt;I am trying to build some dashboard using Splunk REST, unfortunately I can not get the data from certain endpoints when using | rest SPL command, while CURL approach returns what is expected.&lt;/P&gt;
&lt;P&gt;To be specific, I want to read /services/search/jobs/&amp;lt;SID&amp;gt;/summary endpoint. Following SPL returns 0 results:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rest /services/search/jobs/1648543133.8/summary&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When called externally, the endpoint works as expected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[2022-03-29 10:46:25] root@splunk1.lab2.local:~# curl -k -u admin:pass https://localhost:8089/services/search/jobs/1648543133.8/summary --get | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15578  100 15578    0     0   661k      0 --:--:-- --:--:-- --:--:--  661k
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;results preview='0'&amp;gt;
&amp;lt;meta&amp;gt;
&amp;lt;fieldOrder&amp;gt;
&amp;lt;field&amp;gt;_bkt&amp;lt;/field&amp;gt;
&amp;lt;field&amp;gt;_cd&amp;lt;/field&amp;gt;
&amp;lt;field&amp;gt;_eventtype_color&amp;lt;/field&amp;gt;
&amp;lt;field&amp;gt;_indextime&amp;lt;/field&amp;gt;
&amp;lt;field&amp;gt;_kv&amp;lt;/field&amp;gt;
&amp;lt;field&amp;gt;_raw&amp;lt;/field&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The same happens with /services/search/jobs/&amp;lt;SID&amp;gt;/results and /services/search/jobs/&amp;lt;SID&amp;gt;/events.&lt;/P&gt;
&lt;P&gt;When I call /services/search/jobs/ or /services/search/jobs/&amp;lt;SID&amp;gt;, data is returned by both SPL and CURL. I tried this on several Splunk instances with versions ranging from 8.2.3 back to 7.3.3, always using account with admin role - the behavior is always exactly the same.&lt;/P&gt;
&lt;P&gt;Any hints what I might be missing?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 13:15:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/591208#M205825</guid>
      <dc:creator>eregon</dc:creator>
      <dc:date>2022-03-29T13:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why is | rest command not returning any data where CURL works?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/601631#M209382</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149908"&gt;@eregon&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you figure this one out?&amp;nbsp; I'm having the same issue with one of the instances I look after.&lt;/P&gt;&lt;P&gt;Can curl OK - but get nothing when trying to run | rest command from SPL.&lt;/P&gt;&lt;P&gt;Have not seen this issue before - haven't been able to determine the cause as yet.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 02:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/601631#M209382</guid>
      <dc:creator>MKozanic</dc:creator>
      <dc:date>2022-06-14T02:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is | rest command not returning any data where CURL works?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/602066#M209558</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/169934"&gt;@MKozanic&lt;/a&gt; , unfortunately not yet. I got some hints from Splunk expert at .conf, so I'll try and see.&lt;/P&gt;&lt;P&gt;However, you mention you have this issue on one of your instances - does that mean you have some instances where | rest works as expected?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 12:39:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/602066#M209558</guid>
      <dc:creator>eregon</dc:creator>
      <dc:date>2022-06-16T12:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why is | rest command not returning any data where CURL works?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/602082#M209566</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149908"&gt;@eregon&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/169934"&gt;@MKozanic&lt;/a&gt;&amp;nbsp;- These endpoints that you mentioned definitely don't work with SPL command, I can confirm that.&lt;/P&gt;&lt;P&gt;Now, this could be a bug or intentionally not implemented stuff. I'm not sure. But you can do some of these with other SPL functionalities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like, you could fetch the results with loadjob command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| loadjob 1655385534.107304&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would suggest you to change your direction of search. Whatever data you want try to see if there is a separate SPL command to get it.&lt;/P&gt;&lt;P&gt;References:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commandsbycategory" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commandsbycategory&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.6/SearchReference/Loadjob" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.6/SearchReference/Loadjob&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;And Splunk Answers&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 13:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-rest-command-not-returning-any-data-where-CURL-works/m-p/602082#M209566</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-06-16T13:40:23Z</dc:date>
    </item>
  </channel>
</rss>

