Getting Data In

How to do a REST GET call output_mode=json with parameter count=0 to get a list of search peers?

benoitleroux
Explorer

I am using REST to get the list of search peers and cannot find a way to change the default of 30 results.

It should be done by setting count=0 as a parameter, but is does not work.

curl -k -u user:password https://domain:port/services/search/distributed/peers?output_mode=json&count=0

If I do:

curl -k -u user:password https://domain:port/services/search/distributed/peers?output_mode=json -d count=0

It is interpreted as a POST call which requires a name="something"

Thanks,

0 Karma

acharlieh
Influencer

Are you using bash or a shell that's interpreting the ampersand as a special character? does:

  curl -k -u user:password "https://domain:port/services/search/distributed/peers?output_mode=json&count=0"

work?

0 Karma

benoitleroux
Explorer

Yes, the "" fixed the issue. Thanks,

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

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

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...