Getting Data In

How to request an accelerated report via REST?

Path Finder


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?

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.
In Job Manager, it reports the following:
Search ID: myuser_nobody_search_RMD5a79ee73818f66aa4at150710975645011
Summary ID: 1F08A505-35F7-44C1-B50E-2D1D9BB70318searchnobody_NSfd08606a4b07f6bc

If I run (using the search ID):

curl -k -u myuser https://localhost:8089/services/search/jobs/myuser__nobody__search__RMD5a79ee73818f66aa4_at_15071097...

I get results for the most current run, but I don't know if this resultset will update as the underlying data changes

If I run (using the summary ID):

curl -k -u myuser https://localhost:8089/services/search/jobs/1F08A505-35F7-44C1-B50E-2D1D9BB70318_search_nobody_NSfd0...

I get a response of: Unknown sid.

Is there an easy way to always request the latest state of the accelerated report?


Best regards,


Re: How to request an accelerated report via REST?

Super Champion
0 Karma

Re: How to request an accelerated report via REST?

Path Finder

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.

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:
curl -k -u myuser https://localhost:8089/services/search/jobs -d search="| savedsearch myacceleratedreport"

This will return a very simple XML response:

<?xml version="1.0" encoding="UTF-8"?>

And then you can use that SID to get the result set:

curl -k -u myuser https://localhost:8089/services/search/jobs/1511349561.1768776/results

I'm not sure there's an easier way than this after trawling through the documentation for hours.

0 Karma