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?
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