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!

Pro Tips for First-Time .conf Attendees: Advice from SplunkTrust

Heading to your first .Conf? You’re in for an unforgettable ride — learning, networking, swag collecting, ...

Raise Your Skills at the .conf25 Builder Bar: Your Splunk Developer Destination

Calling all Splunk developers, custom SPL builders, dashboarders, and Splunkbase app creators – the Builder ...

Hunt Smarter, Not Harder: Discover New SPL “Recipes” in Our Threat Hunting Webinar

Are you ready to take your threat hunting skills to the next level? As Splunk community members, you know the ...