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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...