cancel
Showing results for 
Search instead for 
Did you mean: 

API only returns 10 results when I query all wireless clients

is_trouser
New Contributor III

https://IP:8443/wsg/api/public/v9_1/query/client

Here is my filter:

{
"filters": [
{
"type": "WLAN",
"value": "22"
}
]
}

It worked but only has 10 clients in "list" instead of 1768. How can I return correct number of client?

{
    "totalCount"1768,
    "hasMore"true,
    "firstIndex"0,
    "list": [XXXXXXXXXXXXXXX],
    "extra"null
}
 
2 ACCEPTED SOLUTIONS

Vineet_nejwala
Moderator
Moderator

@is_trouser 

By default the query will return only 10 entries. Try below and you can modify the number of entries returned, adding "limit" parameter to your body: "limit": X (where X is the number of entries returned).

Modified body:

{
"filters": [
{
"type": "WLAN",
"value": "22"
}
]
}
"limit":20
}

FYR :

https://support.ruckuswireless.com/articles/000009412

Best Regards

Vineet

View solution in original post

Hi @is_trouser 

For example : 

POST : https://:8443/api/public/v7_0/query/ap/wlan

Body :
{
"filters": [
{
"type": "DOMAIN",
"value": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7"
}
],
"fullTextSearch": {
"type": "AND",
"value": ""
},
"attributes": [
"*"
]
}

Results:

{"totalCount":468,"hasMore":true,"firstIndex":0,"list"

The query would return only 10 entry results by default

Modified body:

{
"filters": [
{
"type": "DOMAIN",
"value": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7"
}
],
"fullTextSearch": {
"type": "AND",
"value": ""
},
"attributes": [
"*"
] ,
"limit":1000
}

The query would return 1000 entry results by default

Best Regards

Vineet

View solution in original post

7 REPLIES 7

Vineet_nejwala
Moderator
Moderator

@is_trouser 

By default the query will return only 10 entries. Try below and you can modify the number of entries returned, adding "limit" parameter to your body: "limit": X (where X is the number of entries returned).

Modified body:

{
"filters": [
{
"type": "WLAN",
"value": "22"
}
]
}
"limit":20
}

FYR :

https://support.ruckuswireless.com/articles/000009412

Best Regards

Vineet

Hi Vineet

Thanks for your reply. Sorry I can't open the support URL.

Maybe you missed a "{" in the Modified body. So I tried many times but it still doesn't work. Could you help to check where is the error?

{
"filters": [
{
"type": "WLAN",
"value": "22"
}
]
},
{
"limit":20
}

Hi @is_trouser 

For example : 

POST : https://:8443/api/public/v7_0/query/ap/wlan

Body :
{
"filters": [
{
"type": "DOMAIN",
"value": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7"
}
],
"fullTextSearch": {
"type": "AND",
"value": ""
},
"attributes": [
"*"
]
}

Results:

{"totalCount":468,"hasMore":true,"firstIndex":0,"list"

The query would return only 10 entry results by default

Modified body:

{
"filters": [
{
"type": "DOMAIN",
"value": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7"
}
],
"fullTextSearch": {
"type": "AND",
"value": ""
},
"attributes": [
"*"
] ,
"limit":1000
}

The query would return 1000 entry results by default

Best Regards

Vineet

Hi Vineet

It worked now! Thank you so much!

As you said, it really supports only 1000 results. Actually I have more than 1700 clients (totalcount: 1768). Could you let me know how to add the page parameter?

 

{
"filters": [
{
"type": "WLAN",
"value": "22"
}
],
"limit": 1000
}