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
Get Updates on the Splunk Community!

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

[Puzzles] Solve, Learn, Repeat: Nested loops in Event Conversion

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Your Guide to Splunk Digital Experience Monitoring

A flawless digital experience isn't just an advantage, it's key to customer loyalty and business success. But ...