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!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...