Splunk Search

Can we pass a parameter to a report?

danielbb
Motivator

Is there a way to pass a parameter to a report when calling it via - 

 

curl -u user:password -k https://<api_server>:8089/servicesNS/nobody/<app_name>/search/jobs -d "search=savedsearch <savedsearch_name>" -d exec_mode=oneshot -d count=10000

 




0 Karma

yuanliu
SplunkTrust
SplunkTrust

Depending on what you want to pass - or, in an awkward way to say it, where you want to pass into.  You cannot change SPL in a saved search when calling it.  There are limited ways to influence the output by passing CGI variables in GET method.  The most obvious, and arguably the most useful one is earliest and latest. To do so, you will need to save with Time Range Picker "Yes"; and the SPL in the saved search must not have override to earliest and latest.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...