<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Requesting an API call to find revision by date in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52317#M1600</link>
    <description>&lt;P&gt;If you end up making more than one call, I'm pretty sure that consumes more resources on the Dropbox side than if you had just requested all 1,000 in the first call.&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2015 06:50:44 GMT</pubDate>
    <dc:creator>Steve M.</dc:creator>
    <dc:date>2015-05-21T06:50:44Z</dc:date>
    <item>
      <title>Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52312#M1595</link>
      <description>&lt;P&gt;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 to the specified date on either side—that is, the latest revision before the specified date and the earliest revision after the specified date).&lt;/P&gt;

&lt;P&gt;Suppose I knew I wanted to restore a file to the state it was on 2015-05-02 22:32 GMT.  The only practical way to go about this is to fetch an increasingly large number of revisions with /revision (starting with 10, then 100, then 1000) until the oldest one is after the required date.  That's a heck of a lot of work on Dropbox's end and a lot of bandwidth spent transferring data which is mostly useless to me, since I'm only looking for one or two revisions.  And that might actually still be a failure, if there have been more than 1000 revisions since the date I'm trying to restore to.&lt;/P&gt;

&lt;P&gt;Unless there's some better way to do that which I've missed, I'd like to suggest a new endpoint called, say, find_revision, which takes a path, a date, and a bool "after," and returns the revision number for the specified file for the revision closest to that date.  If after is true, it looks for the closest revision after the specified date, otherwise it looks for the closest revision equal to or before.  (Alternatively, you could simplify it to return both revisions, if they exist, and not bother with the additional bool param.)&lt;/P&gt;

&lt;P&gt;Relatedly, though I don't actually need it myself, it might be useful for some developers to have an endpoint that takes a path and a revision number and returns the previous and next valid revision numbers.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:42:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52312#M1595</guid>
      <dc:creator>Daniel E.2</dc:creator>
      <dc:date>2019-05-29T09:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52313#M1596</link>
      <description>&lt;P&gt;You're correct, unfortunately the Dropbox API doesn't currently offer a way to query revisions by date, or retrieve more than 1,000 revisions, but I'll be sure to pass this along as feedback. &lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2015 01:42:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52313#M1596</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-20T01:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52314#M1597</link>
      <description>&lt;P&gt;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.&lt;/P&gt;

&lt;P&gt;While you're passing this along, if I can add two more suggestions?  &lt;/P&gt;

&lt;P&gt;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.&lt;/P&gt;

&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2015 21:51:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52314#M1597</guid>
      <dc:creator>Daniel E.2</dc:creator>
      <dc:date>2015-05-20T21:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52315#M1598</link>
      <description>&lt;P&gt;Daniel, all of your suggestions are good ones. Thanks.&lt;/P&gt;

&lt;P&gt;As for what you should do now, why wouldn't you just always request 1000 (the max) revisions? Are you trying to speed the process up? Save bandwidth? Something else?&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2015 22:01:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52315#M1598</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-05-20T22:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52316#M1599</link>
      <description>&lt;P&gt;There's no reason on my end not to do it, I just didn't want to put undue strain on your service.  I mean, obviously, even a fairly popular Dropbox app's API calls probably represent an infinitesimal fraction of the bandwidth you folks push out on a minutely basis--and I doubt what I'm writing now will be "fairly popular," even if I do let it escape into the wild--but I try my best to write well-behaved software when I can, particularly when it's going to be using someone else's services.&lt;/P&gt;

&lt;P&gt;If it proves to be too complicated a solution to implement, I'll just give up and go hog wild with 1000-revision API calls, though, sure &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 06:48:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52316#M1599</guid>
      <dc:creator>Daniel E.2</dc:creator>
      <dc:date>2015-05-21T06:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52317#M1600</link>
      <description>&lt;P&gt;If you end up making more than one call, I'm pretty sure that consumes more resources on the Dropbox side than if you had just requested all 1,000 in the first call.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 06:50:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52317#M1600</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-05-21T06:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52318#M1601</link>
      <description>&lt;P&gt;Hmm, good point.  It probably should've occurred to me that servicing the request is the expensive part, not actually transmitting the data.  (In my defence, I've done very little back-end work--not really my area.)  I guess I'll just set that more complicated plan aside until someone asks me to make a mobile version of this thing and I want to save them some data charges.  And hey, maybe by then we'll have that new /metadata parameter!&lt;/P&gt;

&lt;P&gt;Thanks for the info!&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 07:05:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/52318#M1601</guid>
      <dc:creator>Daniel E.2</dc:creator>
      <dc:date>2015-05-21T07:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/373856#M21019</link>
      <description>&lt;P&gt;Not only can't we query revisions by date, we can't query more than the most 100 recent revisions, period (as of v2). Major drawback if you update a file frequently and want to programmatically retrieve something alreadya availble in the web UI.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 20:59:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/373856#M21019</guid>
      <dc:creator>HaPsantran</dc:creator>
      <dc:date>2019-10-23T20:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting an API call to find revision by date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/373860#M21021</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/428151"&gt;@HaPsantran&lt;/a&gt;&amp;nbsp;Thanks for the feedback!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 21:03:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Requesting-an-API-call-to-find-revision-by-date/m-p/373860#M21021</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-10-23T21:03:04Z</dc:date>
    </item>
  </channel>
</rss>

