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!

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...