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 (3)
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!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...