Forum Discussion

vishalseth's avatar
vishalseth
Explorer | Level 3
7 years ago

How can I get the total storage used by a member using the API?

I'm trying to get a list of all members and the storage used by each using the business API. The members/list api doesn't seem to return the storage used by the member. How else can we get at this information?

7 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    Unfortunately, the Business API doesn't offer quite what you're looking for. You can get information about the connected team's overall space using using /2/team/reports/get_storage, but that isn't broken down by member or group:

    https://www.dropbox.com/developers/documentation/http/teams#team-reports-get_storage

    Likewise, /2/team/members/get_info and/2/team/members/list[/continue] don't return space usage information, as you mentioned. I'll send this along as a feature request though.

    If your app has the "team member file access" permission though, one workaround is to use the member file access feature:

    https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access

    And call /2/users/get_space_usage for each user:

    https://www.dropbox.com/developers/documentation/http/documentation#users-get_space_usage

  • vishalseth's avatar
    vishalseth
    Explorer | Level 3
    7 years ago

    The call per member could be a slow operation and potentially run into api throttling for mass reporting.

    The admin center export of members has a column for member storage. Is there a programattic way of generating and downloaidng this export?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    No, unfortunately that's not accessible via the API.

  • vishalseth's avatar
    vishalseth
    Explorer | Level 3
    7 years ago

    Is there a place or way we can track the feature request for this new functionality?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    This forum thread serves as the reference for this feature request. I'll follow up here if/when there's any update on this.

  • SJ_Code's avatar
    SJ_Code
    Explorer | Level 3
    2 years ago

    Hi Greg, Any update on this feature request?

     

    Getting space usage for each user by /users/get_space_usage is slow and eventually runs into rate limit or retry exception. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!