Getting Data In

REST /services/data/indexes: How can I see all my indexes using this command?

SK110176
Path Finder

When I run the following command to list the indexes on my indexers, I only see the top 30 per indexer:

| rest /services/data/indexes

How can I see all my indexes using this command?

Labels (2)
Tags (2)
1 Solution

kristian_kolb
Ultra Champion

According to the docs,

| rest /services/data/indexes count=0

OR

https://indexer:8089/services/data/indexes?count=-1

The docs mention that the default for the rest search command is 0, i.e. unlimited. For the REST API, however the documented default is 30 (and -1 is what you set for 'unlimited').

As I have less than 30 indexes, I cannot verify this.

Hope this helps,

/K

View solution in original post

kristian_kolb
Ultra Champion

According to the docs,

| rest /services/data/indexes count=0

OR

https://indexer:8089/services/data/indexes?count=-1

The docs mention that the default for the rest search command is 0, i.e. unlimited. For the REST API, however the documented default is 30 (and -1 is what you set for 'unlimited').

As I have less than 30 indexes, I cannot verify this.

Hope this helps,

/K

jokertothequinn
Explorer

/services/data/indexes is not listing the metrics indexes

0 Karma

jokertothequinn
Explorer

In order to get metrics index info also:

| rest /services/data/indexes count=0 datatype=all



Tags (1)
0 Karma

efavreau
Motivator

I found this answer first, and then found it here: https://answers.splunk.com/answers/10237/getting-splunk-api-to-return-more-than-30-deployment-client...
I was not able to find documentation of the "-1". Thank you!

###

If this reply helps you, an upvote would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...