Getting Data In

Filter and get count of kvstore records via REST API

asnegina
New Member

I have a kvstore collection with ~50 000 records. I want to get count of records that satisfy some conditions, but I don't want to get the records itself because json response can be very huge with query like:

.../servicesNS/nobody/app/storage/collections/data/collection?query=somequery

Can I achieve this using REST?

0 Karma
1 Solution

starcher
SplunkTrust
SplunkTrust

run an inputlookup search with a stats count. Should be fast enough to do as one shot search via api.

 | inputlookup kvstoreLookup where field=value | stats count

View solution in original post

0 Karma

starcher
SplunkTrust
SplunkTrust

run an inputlookup search with a stats count. Should be fast enough to do as one shot search via api.

 | inputlookup kvstoreLookup where field=value | stats count
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...