cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Way to get statistics on all Files and Folders from Dropbox API?

Way to get statistics on all Files and Folders from Dropbox API?

mjmontgo
Explorer | Level 3
Go to solution

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:

  • Starred Files: each File by; Size
  • Folders & Sub-folders: each Folder by; Size, # of Files

Id appreciate any guidance on if/how to do this. I'm using their HTTP endpoints in Vue 3. Thanks!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

[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.)

mjmontgo
Explorer | Level 3
Go to solution

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. 

https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-to-download-All-Content/m-p...

 

In meantime, can you advise on one last question; is there a way to retrieve recently modified files?

 

Thanks!

 

 

Greg-DB
Dropbox Staff
Go to solution

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    mjmontgo Explorer | Level 3
What do Dropbox user levels mean?