Getting Data In

api REST searching on partial job results

Chris_R_
Splunk Employee
Splunk Employee

I am running a pretty basic search such as this

email="someemail@domain.com" OR email="someemail@domain.com"  

The job takes about 30 seconds to complete, but does not return results until the job is done. Is there any way to get partial results of the running job with an api call?

Some call's i've tried that dont return the partial job results so far.

https://server:8089/services/search/jobs/1279579745.369/results?output_mode=json&preview=1&count=0

https://server:8089/services/search/jobs/1279579330.368/results?output_mode=json&count=0

https://server:port#/services/search/jobs/1276629355.47/results_preview
Tags (2)
1 Solution

Lowell
Super Champion

Just a guess, but what is your buckets value? It defaults to 0 for REST API calls, which makes the search job faster but prevents interactive results. Try setting it to a higher number (the UI uses 300, if I remember correctly.)

View solution in original post

Lowell
Super Champion

Just a guess, but what is your buckets value? It defaults to 0 for REST API calls, which makes the search job faster but prevents interactive results. Try setting it to a higher number (the UI uses 300, if I remember correctly.)

Chris_R_
Splunk Employee
Splunk Employee

Lowell, thanks i am getting better results with:

curl -k -u admin:changeme -d "search=search * &preview=1&status_buckets=300" https://server:port/services/search/jobs

The job seems to stay alive much longer

0 Karma
Get Updates on the Splunk Community!

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 ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...