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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...