Knowledge Management

Error while Invoking Search Macro using REST API

ngohel
Explorer

Does anyone know how to invoke a macro on Splunk Cloud using Rest API?  I am using following command but it always returns the output as "No matching fields exist." .

I am able to run the same macro directly from Splunk Search Page and it does return results.

curl -k -u uswer:"password" -k https://company.splunkcloud.com:8089/services/search/v2/jobs/export -d exec_mode=oneshot -d search="\`lastLoginStatsByUserProd(userid,7)\`" -d output_mode=json

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...