Splunk Search

"Page not found" when trying to search through REST API

dzkashlach
Engager

Hello everyone!

I receive "Page not found" message when I try to search using REST API.

My URL: [splunkhost]/en-US/services/search/jobs%20-d%20search="search%20index=enwiki""

Even such very common search gives nothing, although there is index=enwiki in system and I'm able to 

search in it through webui.

I was using https://docs.splunk.com/Documentation/Splunk/8.2.1/RESTTUT/RESTsearches

as a reference.

What should I check?

splunk-page-not-found.png

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The examples in that document are for the command-line interface and won't work in a web browser.  When converting the examples for use in a browser, the part following "-d" goes in the body of a POST request.

---
If this reply helps you, Karma would be appreciated.

dzkashlach
Engager

Ok, thanks for tip.

One more moment:

curl -v -k --cookie "session_id_8080=session-id-value" http://host:port/en-US/services/search/jobs -d search="search *"

this one also gives me Page not found, although I'm taking cookie from valid session. 

I guess, I'm missing something in path ?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...