Splunk Search

Mismatch in Stats UI & Splunk API

sugankrish88
New Member
index=<<My_index>>  earliest="12/23/2020:10:00:00" latest="12/23/2020:11:00:00" "<<url>>" | eval MyFeild=replace(MyFeild,"\d{1}\d+","") | search MyFeild=*sample_search* | stats count by MyFeild
 
When I have been using the above search criteria in UI , it gives the a table in Statistics tab with 
MyFeild and its total Count 
 
when I am using the splunkapi for some reason I am not getting the consolidated ouput
https://<<mydomain for my splunkapi>>/services/search/jobs/export?search=search index=<<My_index>>  earliest="12/23/2020:10:00:00" latest="12/23/2020:11:00:00" "<<url>>" | eval MyFeild=replace(MyFeild,"\d{1}\d+","") | search MyFeild=*sample_search* | stats count by MyFeild
 
Not sure If I am missing anything here 
 
 
Labels (4)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You say you don't get the "consolidate output", but what do you get?  Why are you trying to remove numerical data from the URL?  Are you authenticating in your request? Are you encoding the URL before sending it?

Please share the full API request.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...