Splunk Search

Blank Content While Using REST API Python

NatanS
Explorer

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
Explorer

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
Explorer

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

0 Karma
Get Updates on the Splunk Community!

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...