Dashboards & Visualizations

REST API Access

niraro
New Member

Hi all  :),

I am trying to use Splunk rest API using postman.

when I try to make a request on port 8089 I am getting a "COULD NOT GET ANY RESPONSE".

the url is the right one and the host is listening to the port 

I cant get a response using curl and python either

the web UI is working properly (port 8000) and sending data using HEC too (port 8089) 

Labels (2)
Tags (5)
0 Karma

efavreau
Motivator

How do you know the host and port are correct, if you can't get a response? Or perhaps they are correct, and you have a firewall between you and the host? We can't help you with the firewall scenario, but if you are certain it's correct, try a basic curl command, so you can test connectivity. If you can't connect, you can send the basic command and the result, to your network/firewall admins.

From this page: https://docs.splunk.com/Documentation/Splunk/8.2.1/RESTUM/RESTusing
Try this curl command, see if you get through, and if so, what the response is.

curl -k https://localhost:8089/services/auth/login --data-urlencode username=admin --data-urlencode password=pass

 

###

If this reply helps you, an upvote would be appreciated.
0 Karma

niraro
New Member

Hi, thank you for answering.

I know the hostname is correct becose I can send events to that url and the port I am trying to make a request to is the deafult mgmt port (8089).

There is no firewall between me and the host and I've tried changing the mgmt port (to 8090 using the etc/system/deafult/web.conf file) and the same problem occured.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...