Security

Is there a way to access the Splunk Web UI using curl?

shangshin
Contributor

Hi,

Is there a way to access Splunk Web UI by using curl? I am able to access it by using the management port 8089, but still need to access the UI via web port 8000

I got the error message below when using using curl:

curl -sku admin:changeme http://mysplunkserver:8000/

This resource can be found at <a href='http://mysplunkserver:8000/en-US/'>http://mysplunkserver:8000/en-US/</a>.507 
Tags (3)
0 Karma
1 Solution

somesoni2
Revered Legend

If you just want to refresh one endpoint, you can try any one of these method

curl -k -u admin:changeme https://splunkserver:8089/services/configs/conf-alertactions/_reload

OR

(after cd to splunk's bin directory)

./splunk _internal call /configs/conf-alertactions/_reload -auth admin:changeme 

View solution in original post

somesoni2
Revered Legend

If you just want to refresh one endpoint, you can try any one of these method

curl -k -u admin:changeme https://splunkserver:8089/services/configs/conf-alertactions/_reload

OR

(after cd to splunk's bin directory)

./splunk _internal call /configs/conf-alertactions/_reload -auth admin:changeme 

shangshin
Contributor

Thanks a lot for the info.

I tried both options and got HTTP Status: 200

However, after executing the command, I didn't see the change reflected on the Email Settings of Splunk web UI below.

http://splunkserver:8000/en-US/manager/launcher/admin/alert_actions/email?action=edit

Maybe I should try different REST path? Can you direct me where to get a list of all REST paths?

0 Karma

shangshin
Contributor

I found it from the online doc. Thanks again!

0 Karma

somesoni2
Revered Legend

Any specific requirement for "accessing" Splunk Web from curl? A curl command is typically used to transfer data/receive data from a server/url without user interaction, that's why it does work with Management port.

0 Karma

shangshin
Contributor

I want to refresh this configuration /debug/refresh?entity=admin/alert_actions

Please advise if you know I can achieve the same goal using management port. Thank you!

0 Karma

masonmorales
Influencer

What are you trying to accomplish by accessing splunkweb via curl?

0 Karma

shangshin
Contributor

I want to refresh this configuration /debug/refresh?entity=admin/alert_actions

There is an app called add-on debug refresh but the refresh command takes more than 2-3 minutes to complete. On the other hand, the url completes within 5-10 seconds.

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...