Discuss Dropbox Developer & 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. Specifically showing:
Id appreciate any guidance on if/how to do this. I'm using their HTTP endpoints in Vue 3. Thanks!
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.
[Cross-linking for reference: https://stackoverflow.com/questions/74183804/way-to-get-statistics-on-all-files-and-folders-from-dro... ]
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.)
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!
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.
Hi there!
If you need more help you can view your support options (expected response time for a 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!