We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
janeR
9 years agoExplorer | Level 3
create report of file type usage
I need to create a usage report of our whole company's dropbox instance. For example, we need to know how much video files (in data size) are stored within the whole instance. How do I go about finding all these video files from all user accounts? Is there an example I can begin with? Which APIs would help in this scenario? Thanks!
5 Replies
- Greg-DB9 years ago
Dropbox Community Moderator
To gather this information for a Dropbox Business team, you'd first need to register a Dropbox Business API app with the "team member file access" permission.
I don't believe we have an example that covers this particular use case, but you would get the full team member list using /2/team/members/list[/continue]. Then, using the "member file access" feature, for each member you can call /2/files/list_folder[/continue] to get information about all of the files in that members account. You can check the size for each file with an extension that you're interested in.
- janeR9 years agoExplorer | Level 3
Thanks for the reply. We have around 25K users and around TBs of data. Have you run a query like on data this huge? I am just thinking if there's a limit to the data that can be pulled at a certain time. Or any other limitation that I should be aware of? I am still learning the use of the dropbox APIs. Thanks again.
- Greg-DB9 years ago
Dropbox Community Moderator
I haven't written something quite like this for a team that large. It may take a long time to run for that many users unfortunately, and I'm afraid I don't have a better solution to offer.
Also, the Dropbox API does have a rate limiting system, but it's mainly meant to prevent abuse so I wouldn't expect it to be an issue for this. - janeR9 years agoExplorer | Level 3
Can i use the search API? I was trying Search but I dont think I can use advance search criteria there such as extension=<video extensions> createdDate=<certain date>. Maybe I'm missing something as far as how the API can be used.
- Greg-DB9 years ago
Dropbox Community Moderator
You can use /2/files/search instead of /2/files/list_folder[/continue], but there aren't advanced search options, such as listing extensions and dates like this. You can search for specific file extensions by supplying the extension as the query, but you can only do one in a single search API call . Depending on the specifics of your team, e.g., the number of files they have, and how many extensions you're interested in, etc. this may or may not be better than just using /2/files/list_folder[/continue].
About 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!