Joseph Rouquettes
Joseph Rouquettes

Reputation: 1

Search on splunk not working with the API

I'm trying to catch the response of a search in the logs using the API of the staging version of Splunk in my compagny.  To connect to the API, I'm using a token. My command is : 

curl -k https://compagnyInstance.splunkcloud.com:8089/services/search/jobs --header 'Authorization: Bearer Token' -d search "search index="proxy" "

And the response is :

curl: (28) Failed to connect to compagnyInstance.splunkcloud.com port 8089 after 21060 ms:
Couldn't connect to server
curl: (6) Could not resolve host: Bearer
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL

The big problem is that for one of my colleagues, this same command is working perfectly. 
Even when I just want to connect without anything like 

curl -k https://compagnyInstance.splunkcloud.com:8089

I get this:

curl: (28) Failed to connect to compagnyInstance.splunkcloud.com port 8089 after 21063 ms: Couldn't connect to server

I am not in the firewall of my company by the way 

curl -k https://compagnyInstance.splunkcloud.com:8089/services/search/jobs --header 'Authorization: Bearer Token' -d search "search index="proxy" "

And I want to have a response to the research

Upvotes: 0

Views: 338

Answers (0)

Related Questions