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!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...