We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Daniel E.2
11 years agoNew member | Level 1
Requesting an API call to find revision by date
I'm looking at the API documentation for /revisions, and it seems like it's missing a really obvious use case: finding the single revision closest to the specified date (or, the two revisions closest...
Daniel E.2
11 years agoNew member | Level 1
Thanks. My plan for now is to just use an incremental binary search (or whatever academic term there is for that) and maybe cache revision numbers and dates for files with unusually high update frequency, which may suffice but is still more work on my end (and more bandwidth and API requests on yours) than should really be necessary.
While you're passing this along, if I can add two more suggestions?
A more powerful way to fill this gap would be to add the optional date parameter to /metadata instead of /revisions, and have it return the metadata for the object at that point in time. (So, the metadata for the most recent revision of that object equal to or before the specified date.) And, for folders, with list=true, to also return the metadata of the contents at that point in time. This would also make it possible to get historical information about folders. As near as I can tell, the only way to determine if a folder was deleted on a particular date is to check if all of its children were deleted on the same timestamp, and that can't distinguish between a folder itself being deleted or all its contents being deleted simultaneously. More work to implement on your end, though, naturally.
And, secondly, you might consider adding the option to get a more minimal list of information from /revisions and /metadata. For the application I'm writing now, the vast majority of my calls to /revisions are only going to be looking for the revision number and date, and the vast majority of my calls to /metadata will be fore folders with list=true, but are only going to be looking for the paths, is_dir, and is_deleted values of the folder and contents. I suspect that's probably a common use case for those endpoints, and I'm guessing that mobile app developers would love to be able to save their users some unnecessary data transfer.
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!