Splunk Enterprise

Splunk Rest API response in JSON format

Eshwar
Engager

Hi Community,

We are in the process of sending the alerts from Splunk to another application via REST API but response of the REST API is displaying in XML format as our other application would have expect  JSON format however we tried using Postman application as well but the response is same in XML so can any one suggest  JSON response REST API to get the alert details?

Regards,

Eshwar

Labels (2)
0 Karma

Stormy
New Member

Inorder to get the response in json you want to add ?output_mode=json at the end of your rest api call url.
Or you can add it as part of the payload.

0 Karma

yallami
Explorer

Hi, did you find a solution?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try specifying output_mode=json.  See https://docs.splunk.com/Documentation/Splunk/9.1.3/RESTUM/RESTusing#Encoding_schemes

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

Eshwar
Engager

Hi @richgalloway ,

We had tried giving the output_mode parameter for Rest point but still we can see xml  response.

0 Karma
Get Updates on the Splunk Community!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureThursday, March 27, 2025  |  11AM PST / 2PM EST | Register NowStep boldly ...

Splunk AppDynamics with Cisco Secure Application

Web applications unfortunately present a target rich environment for security vulnerabilities and attacks. ...