Splunk Search

Blank Content While Using REST API Python

NatanS
Observer

Why I get empty results while I using REST API (results) Search on python?

NatanS_0-1713168464024.png

And when I using REST API (events) in Python to got like this 

NatanS_1-1713168563323.png


For your information the SID is already successfully retreived using the python program and when I try to use curl command to search the SID jobs (curl -k -u admin:pass https://localhost:8089/services/search/v2/jobs/mysearch_02151949/results) the results is show on the screen without any error.

Can you help me about this case ? Thank you   

Labels (1)
Tags (1)
0 Karma

batabay
Path Finder

Hi,

Try 

 

preview=true

 

It's must be like that 

curl -k -u admin:pass https://localhost:8089/services/search/v2/jobs/mysearch_02151949/results preview=true
0 Karma

NatanS
Observer

What's that function for ?

And how to add that on the python program ?

Is it like this?

NatanS_0-1713172056125.png

 



0 Karma

NatanS
Observer

Because when I try in a python program still got same error 

0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...