We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
mjmontgo
3 years agoExplorer | Level 3
Way to get statistics on all Files and Folders from Dropbox API?
Can anyone suggest if / how I might get statistics on Folders and Files from Dropbox's API?
I'm making a custom visualization of Starred Files and Folders from a Dropbox user account. Specifica...
- 3 years ago
No, the Dropbox API does not offer functionality like that either. Like with total sizes/counts, you'd need to list everything and apply whatever sorting/filtering you want in your code. We'll consider this a feature request as well.
Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/74183804/way-to-get-statistics-on-all-files-and-folders-from-dropbox-api ]
Unfortunately the Dropbox API doesn't offer functionality for these specific queries. It currently does not offer a way to list starred items, to get the total size of the contents of a folder, or to get the total count of items in a folder. I'll pass these along as feature requests, but I can't promise if or when they might be implemented.
To get the total size and count inside a particular folder, you'd need to use to /2/files/list_folder[/continue] with "recursive" set to "true" to list everything and then sum/count the items with your own code. (You can set the "path" to the empty string "" to list the root folder.)
mjmontgo
3 years agoExplorer | Level 3
Hey thanks for this! I appreciate the answer.
Okay so it look like this need more figuring out - either using your approach below or the approach you described for downloading all content.
In meantime, can you advise on one last question; is there a way to retrieve recently modified files?
Thanks!
- Greg-DB3 years agoDropbox Staff
No, the Dropbox API does not offer functionality like that either. Like with total sizes/counts, you'd need to list everything and apply whatever sorting/filtering you want in your code. We'll consider this a feature request as well.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 7 days agoIf 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 or Facebook.
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!