<?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 to request an accelerated report via REST? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365824#M66582</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have a requirement to pull data out of a report that they want updated at (near-enough) real time, so we've created a stats table of the data and put it into a report, which has then been accelerated. We want to be able to grab the data via REST so it can be used in a different application we are creating. How is this done?&lt;/P&gt;

&lt;P&gt;Currently, if I run the report, I can see the most recent search id and I can see that it has been run based on a summary ID.&lt;BR /&gt;
In Job Manager, it reports the following:&lt;BR /&gt;
Search ID: myuser__nobody__search__RMD5a79ee73818f66aa4_at_1507109756_45011&lt;BR /&gt;
Summary ID: 1F08A505-35F7-44C1-B50E-2D1D9BB70318_search_nobody_NSfd08606a4b07f6bc&lt;/P&gt;

&lt;P&gt;If I run (using the search ID):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u myuser https://localhost:8089/services/search/jobs/myuser__nobody__search__RMD5a79ee73818f66aa4_at_1507109756_45011
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get results for the most current run, but I don't know if this resultset will update as the underlying data changes&lt;/P&gt;

&lt;P&gt;If I run (using the summary ID):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u myuser https://localhost:8089/services/search/jobs/1F08A505-35F7-44C1-B50E-2D1D9BB70318_search_nobody_NSfd08606a4b07f6bc/results?count=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get a response of: Unknown sid.&lt;/P&gt;

&lt;P&gt;Is there an easy way to always request the latest state of the accelerated report?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Alex&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 16:01:06 GMT</pubDate>
    <dc:creator>althomas</dc:creator>
    <dc:date>2020-09-29T16:01:06Z</dc:date>
    <item>
      <title>How to request an accelerated report via REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365824#M66582</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have a requirement to pull data out of a report that they want updated at (near-enough) real time, so we've created a stats table of the data and put it into a report, which has then been accelerated. We want to be able to grab the data via REST so it can be used in a different application we are creating. How is this done?&lt;/P&gt;

&lt;P&gt;Currently, if I run the report, I can see the most recent search id and I can see that it has been run based on a summary ID.&lt;BR /&gt;
In Job Manager, it reports the following:&lt;BR /&gt;
Search ID: myuser__nobody__search__RMD5a79ee73818f66aa4_at_1507109756_45011&lt;BR /&gt;
Summary ID: 1F08A505-35F7-44C1-B50E-2D1D9BB70318_search_nobody_NSfd08606a4b07f6bc&lt;/P&gt;

&lt;P&gt;If I run (using the search ID):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u myuser https://localhost:8089/services/search/jobs/myuser__nobody__search__RMD5a79ee73818f66aa4_at_1507109756_45011
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get results for the most current run, but I don't know if this resultset will update as the underlying data changes&lt;/P&gt;

&lt;P&gt;If I run (using the summary ID):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u myuser https://localhost:8089/services/search/jobs/1F08A505-35F7-44C1-B50E-2D1D9BB70318_search_nobody_NSfd08606a4b07f6bc/results?count=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get a response of: Unknown sid.&lt;/P&gt;

&lt;P&gt;Is there an easy way to always request the latest state of the accelerated report?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Alex&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365824#M66582</guid>
      <dc:creator>althomas</dc:creator>
      <dc:date>2020-09-29T16:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to request an accelerated report via REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365825#M66583</link>
      <description>&lt;P&gt;i think if you use &lt;CODE&gt;&lt;A href="https://localhost:8089/services/saved/searches/{name}/history" target="test_blank"&gt;https://localhost:8089/services/saved/searches/{name}/history&lt;/A&gt;&lt;/CODE&gt; first, you can grab &lt;CODE&gt;title&lt;/CODE&gt; out of it and use that in &lt;CODE&gt;&lt;A href="https://localhost:8089/services/search/jobs/{title}" target="test_blank"&gt;https://localhost:8089/services/search/jobs/{title}&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/RESTREF/RESTsearch#saved.2Fsearches.2F.7Bname.7D.2Fhistory"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/RESTREF/RESTsearch#saved.2Fsearches.2F.7Bname.7D.2Fhistory&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 20:46:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365825#M66583</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-11-21T20:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to request an accelerated report via REST?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365826#M66584</link>
      <description>&lt;P&gt;This does technically work, but the first one will only return a result if I've manually gone and run the report recently, otherwise there is no search ID.&lt;/P&gt;

&lt;P&gt;Having fiddled about with it a bit, the only reliable way I can get a search ID without manually going into the GUI is as follows:&lt;BR /&gt;
    curl -k -u myuser &lt;A href="https://localhost:8089/services/search/jobs" target="_blank"&gt;https://localhost:8089/services/search/jobs&lt;/A&gt; -d search="| savedsearch my_accelerated_report"&lt;/P&gt;

&lt;P&gt;This will return a very simple XML response:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;response&amp;gt;
  &amp;lt;sid&amp;gt;1511349561.1768776&amp;lt;/sid&amp;gt;
&amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then you can use that SID to get the result set:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u myuser https://localhost:8089/services/search/jobs/1511349561.1768776/results
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not sure there's an easier way than this after trawling through the documentation for hours.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-request-an-accelerated-report-via-REST/m-p/365826#M66584</guid>
      <dc:creator>althomas</dc:creator>
      <dc:date>2020-09-29T16:55:28Z</dc:date>
    </item>
  </channel>
</rss>

