Splunk Dev

Rest api turn off streaming

Servonlewis1
Observer

Hey guys quick question. 

is it possible for me to use the rest api to do a search query, but not receive a stream of objects, but rather, batch the results into an array of objects?

query: services/search/jobs/export?output\_mode=json&search=savedsearch infraportal\_login\_history user=mrodrig1&summarize=true

Currently receiving a stream of objects like this: 

{"preview":false,"offset":0,"result":{"Computer_Name":"computername","_time":"2021-07-14 13:01:07.000 EDT"}}
{"preview":false,"offset":1,"result":{"Computer_Name":"computername","_time":"2021-07-14 17:01:08.000 EDT"}}
{"preview":false,"offset":2,"lastrow":true,"result":{"Computer_Name":"computername","_time":"2021-07-15 16:01:08.000 EDT"}}

would prefer to have something like [{result},{result2}]

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...