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
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...