Getting Data In

Accessing Saved Report output in json from Splunk Rest API

twh1
Communicator

I have some reports saved under search app. I want to access these report output via Splunk REST API in a java program. I am trying below rest API for accessing output in java program.

API: https://hostname:8089/services/saved/searches/report_name

I can get all related details of this report but unable to get actual output.

Can anyone help me getting the output of this report in json format.

0 Karma

jkat54
SplunkTrust
SplunkTrust

First you must dispatch the report (if you havent already updated it using other means), then you must get the results endpoint to get the results.

When you dispatch the search, you will get a SID (search id). You use that SID in your quest for the results over here at the search/jobs/$SID$/results endpoint:

https://docs.splunk.com/Documentation/Splunk/8.0.0/RESTREF/RESTsearch

Remember that alerts, reports, and searches are all just searches. So the best examples I know of are here in the rest tutorial for searches:

https://docs.splunk.com/Documentation/Splunk/8.0.0/RESTTUT/RESTsearches

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...