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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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