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!

Infographic provides the TL;DR for the 2024 Splunk Career Impact Report

We’ve been buzzing with excitement about the recent validation of Splunk Education! The 2024 Splunk Career ...

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...