Skip to main content
Question

Number of seats?

  • May 22, 2025
  • 2 replies
  • 22 views

Forum|alt.badge.img

Anyone aware of an API-based way to get the total number of seats used by your org?  There's /users, but seems overly expensive in that it returns all your users in paginated form...

Thanks!

2 replies

Forum|alt.badge.img

Hello ,

 

I think that there's nothing available on that sense.

 

There are some functionalities that are not on the API and would be nice to have them such as number of users, number of files owned by a user, number of documents in a folder... 

 

All those elements are needed if you wanna ensure a good management of your limits, being license limits or performance ones. Still not available though.

 

Thanks

 

 


Forum|alt.badge.img

Found a way to do this thanks to an answer on Stackoverflow.

 

Extended the Box SDK's client class as follows:

 

def num_users(self):
        """Return the number of active users.  We essentially make a users
        call, but limit the number of users returned to 1 and extract the
        total_count information from the payload.
        
        Returns:
        An integer representing the number of users.
        """

        url = '{0}/users'.format(API.BASE_API_URL)
        params = dict(limit=1)
        box_response = self._session.get(url, params=params)

        return box_response.json()['total_count']