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!

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...

New Dates, New City: Save the Date for .conf25!

Wake up, babe! New .conf25 dates AND location just dropped!! That's right, this year, .conf25 is taking place ...

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...