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!

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...

Enterprise Security Content Update (ESCU) | New Releases

In April, the Splunk Threat Research Team had 2 releases of new security content via the Enterprise Security ...