Getting Data In

How to enable REST endpoints so that users can use other tools to grab data from Splunk?

kteng2024
Path Finder

How to enable REST endpoints so that users can use other tools to grab data from Splunk? Port 8089 is already opened. But when i paste the search head URL along with port number, all i could see HTML data but not the JSON data from Splunk.

Tags (3)
0 Karma

vasanthmss
Motivator

try to add the query parameter with output_mode=json.

https://<yourhost>:<mgnt_port>/.../../..?output_mode=json

Read this, http://docs.splunk.com/Documentation/Splunk/6.6.0/RESTTUT/RESTsearches

You can return search results in JSON, CSV or XML by setting the output_mode parameter. By default, results are returned in XML format.

For example, to retrieve search results in JSON format, make the following call.

Note: The curl listing includes --get because you are passing a parameter to a GET operation.

curl -u admin:changeme \
     -k https://localhost:8089/services/search/jobs/1258421375.19/results/ \
     --get -d output_mode=json
V
0 Karma
Get Updates on the Splunk Community!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...