Forum Discussion

qinglau's avatar
qinglau
Mentor
11 years ago

How to use Users object page index in REST API call

Hi Guys, 

 

I am using a REST API call with the specific role id to get list of users. However, each time the return total number of users object is only 25.  

 

http://forum.kpn.com/restapi/vc/roles/id/627/users?page=1&pagesize=1000

 The total number of users is 66 . When I am using 

 

http://forum.kpn.com/restapi/vc/roles/id/627/users/count 

 

Is there a way to return all the users object in one call? or i have to change the page parameter each time to make another call to next 25 users. 

 

Cheers,
Qing 

 

  • Hi qinglau ,

     

    The parameter name should be "page_size", not "pagesize", that is why default (25) is used for page size.

     

    Best Regards

    Haidong

  • HaidongG's avatar
    HaidongG
    Lithium Alumni (Retired)

    Hi qinglau ,

     

    The parameter name should be "page_size", not "pagesize", that is why default (25) is used for page size.

     

    Best Regards

    Haidong

    • danaebaldwin's avatar
      danaebaldwin
      Expert
      Is there a call to just get the total number of users currently online? I'd prefer not to get the total number of all users (as this would be a pretty big chunk) and then parse that data for currently logged in users.