Splunk Enterprise Security

Splunk Search from Command Line

sumitp
New Member

Hi,
I am trying to execute a simple Splunk search from command prompt using CURL.
I am using a simple search command like this below
curl -u username:password -k splunkhost:8089/services/search/jobs -d search='search *'

I am receiving this response
<response>
<messages>
<msg type='WARN'>insufficient permission to access this resource</msg>
</messages>
</response>

Am I missing out some permissions?

Tags (1)
0 Karma

lkutch_splunk
Splunk Employee
Splunk Employee

Your syntax looks correct based on the docs: 
https://docs.splunk.com/Documentation/Splunk/8.1.1/RESTTUT/RESTsearches#Example:_Create_a_search

Are you using an on-prem instance or a  cloud instance? There might be some access requirements and limitations: 
https://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTandCloud 

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...