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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...