Splunk Search

restful search not working

kml_uvce
Builder

I am running this

curl -u admin:changeme -k 8089/services/search/jobs/1329299816.358/results -d output_mode=csv

and getting this error:

<?xml version='1.0' encoding='UTF-8'?>
Method Not Allowed

kamal singh bisht
Tags (2)

the_wolverine
Champion

I have to believe there are serious flaws in the documented example which use -d for setting the output_mode. In all the answers I've seen here, you have to actually use "--get" instead of "-d".

0 Karma

Damien_Dallimor
Ultra Champion

Try issuing as a GET request by using the --get flag

curl -k -u admin:changeme https://yourhost:8089/services/search/jobs/1329299816.358/results
--get -d output_mode=csv
0 Karma

kml_uvce
Builder

Yes this serch give me output on splunk ui...

kamal singh bisht
0 Karma

Damien_Dallimor
Ultra Champion

Does the command for search job you posted for that ID actually return any data ?

0 Karma

kml_uvce
Builder

This is not giving me any output

curl -k -u admin:changeme2 https://:8089/services/search/jobs/1329299816.358
/results --get -d output_mode=csv

kamal singh bisht
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...