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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...