I am trying to get restful service from splunk
curl -k -u username:password -k https://
I am getting this error.
<?xml version='1.0' encoding='UTF-8'?>
But I have the permission to run/view in web splunk.
You need to specify the "search" command at the start of the search parameter. When you run searches in the web UI, the search command is implicitly added at the start, however when interacting directly with the REST API it is not.
So, the modification needed to make this work should be:
curl -k -u <username:password> -k https://<splunk server="">/services/search/jobs -d search="search index=neteng|head 5"