Splunk Search

Data not coming in JSON format from Splunk Javascript sdk

tikoonikhil
Explorer

I am querying Splunk using javascript SDK. In the searchParams, i have given the output mode as "json_rows".

var searchParams = {
    exec_mode: "normal",
    output_mode: "json_rows"
};

Any idea what is going wrong? I tried "json_cols" and only "json" also. Same result.

Thanks in advance.

0 Karma

gwobben
Communicator

The docs are not very clear on this so I'm not really sure, but have you tried capitals?

"output_mode: Specifies the output format of the results (XML, JSON, JSON_COLS, JSON_ROWS, CSV, ATOM, or RAW)." 

http://dev.splunk.com/view/javascript-sdk/SP-CAAAEFA#oneshotjob

0 Karma
Get Updates on the Splunk Community!

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...