<?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: How to Undelete a File via the API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87730#M2687</link>
    <description>&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/core/docs#restore" rel="nofollow noreferrer"&gt;&lt;CODE&gt;/restore&lt;/CODE&gt;&lt;/A&gt; is the right endpoint.&amp;nbsp;When you say it "did not seem to work," what do you mean? What&amp;nbsp;did you try, and what exactly went wrong?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2015 02:31:47 GMT</pubDate>
    <dc:creator>Steve M.</dc:creator>
    <dc:date>2015-07-23T02:31:47Z</dc:date>
    <item>
      <title>How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87729#M2686</link>
      <description>&lt;P&gt;I tried to &amp;nbsp;do a restore ... that did not seem to work.&lt;/P&gt;

&lt;P&gt;Is undelete only available via the Web interface ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:41:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87729#M2686</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2019-05-29T09:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87730#M2687</link>
      <description>&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/core/docs#restore" rel="nofollow noreferrer"&gt;&lt;CODE&gt;/restore&lt;/CODE&gt;&lt;/A&gt; is the right endpoint.&amp;nbsp;When you say it "did not seem to work," what do you mean? What&amp;nbsp;did you try, and what exactly went wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 02:31:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87730#M2687</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-07-23T02:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87731#M2688</link>
      <description>&lt;P&gt;I restored using the latest version ... is the latest version the deleted version ?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It return an error indicating the file did not exist.&lt;/P&gt;

&lt;P&gt;Maybe I needed to use the N-1 version.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 02:41:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87731#M2688</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2015-07-23T02:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87732#M2689</link>
      <description>&lt;P&gt;I was able to restore using the N-1 version. (i.e. the second revision returned from the revisions call)&lt;/P&gt;

&lt;P&gt;Might be good to add a comment or example on restore API on how to undelete a file.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 05:25:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87732#M2689</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2015-07-23T05:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87733#M2690</link>
      <description>&lt;P&gt;Thanks for the suggestion!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 05:26:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87733#M2690</guid>
      <dc:creator>Leah C.1</dc:creator>
      <dc:date>2015-07-23T05:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87734#M2691</link>
      <description>&lt;P&gt;I can't believe this bit me again. The first time was with the Android V1 API. Now with the .NET API&lt;/P&gt;
&lt;P&gt;The Scenario:&lt;/P&gt;
&lt;P&gt;From the WebPage Access I delete a file.&lt;/P&gt;
&lt;P&gt;Then from the API I detect the file does not exist (Fails on the GetMetadata request for the path.)&lt;/P&gt;
&lt;P&gt;So I check to see if I can restore by calling ListRevisions. It shows file is deleted.&amp;nbsp;I get 3 back FileMetadata entries: (Deleted, MostRecent, Orignal).&lt;/P&gt;
&lt;P&gt;If I try yo restore the Delete file it fails ... indicating ivalid revision ... &amp;nbsp;but there is NOTHING in the FileMetaData that indicates the first entry is Deleted ... i.e. should the IsDeleted flag be set ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to use Files.RestoreAsync using the Revison from all 3 FileMetadata returned from ListRevisions and was not able to restore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 00:59:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87734#M2691</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-09T00:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87735#M2692</link>
      <description>&lt;P&gt;Richard, can you share some sample code/output for the issues you're seeing?&amp;nbsp;Thanks in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 03:03:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87735#M2692</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T03:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87736#M2693</link>
      <description>&lt;DIV&gt;&amp;nbsp; public async Task&amp;lt;FileMetadata&amp;gt; RestoreFile(String DBPath) {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FileMetadata result = null;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListRevisionsResult rev = await mClient.Files.ListRevisionsAsync(DBPath);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rev.IsDeleted) {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (FileMetadata md in rev.Entries) {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return await mClient.Files.RestoreAsync(DBPath, md.Rev);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception) {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PersistLog.e(TAG, String.Format("RestoreFile:Failed for:{0} revision:{1}", DBPath, md.Rev));&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception) {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PersistLog.e(TAG, String.Format("RestoreFile:Failed for:{0}", DBPath));&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:18:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87736#M2693</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-09T04:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87737#M2694</link>
      <description>&lt;P&gt;Can you also post whatever error or unexpected output you're getting?&amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:23:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87737#M2694</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T04:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87738#M2695</link>
      <description>&lt;P&gt;Inspecting information from the limited feedback in the exception ... It indicates the &amp;nbsp;Revision is bad.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:31:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87738#M2695</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-09T04:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87739#M2696</link>
      <description>&lt;P&gt;Your code is working fine to restore a file in my testing. Can you share the output you're getting (what you're logging with&amp;nbsp;PersistLog)? That looks like it may contain some useful information for your particular case.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:59:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87739#M2696</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T04:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87740#M2697</link>
      <description>&lt;P&gt;The only thing is the DBPath nothing else useful except the exception.&lt;/P&gt;
&lt;P&gt;PersistLog just makes a copy of the error ... otherwise it's just a print statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is in an application context .. So the file is in the top level of my APP folder.&lt;/P&gt;
&lt;P&gt;The DBPath is: "/AccountInfo-DO-NOT-DELETE-DO-NO-SHARE"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 05:17:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87740#M2697</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-09T05:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87741#M2698</link>
      <description>&lt;P&gt;What about&amp;nbsp;md.Rev? The exception is reporting an invalid revision, so that value may be relevant.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 05:23:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87741#M2698</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T05:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87742#M2699</link>
      <description>&lt;P&gt;mClient is the DropboxClient opened with my APP Token&lt;/P&gt;
&lt;P&gt;Note: the call to ListRevisionsAsync worked!&lt;/P&gt;
&lt;P&gt;md.Rev &amp;nbsp;is from the FileMetadata that is in the list of entries returned from ListRevisionsAsync.&lt;/P&gt;
&lt;P&gt;I looked at it ... It seemed reasonable ... a string with numbers and a few letters in it ... maybe Base64 or Hex encoded ... I do not remember exactly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: I iterated over the list of FileMetadata returned from ListRevisionsAsync (there were 3) .. they ALL generated an exception.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 06:14:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87742#M2699</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-09T06:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87743#M2700</link>
      <description>&lt;P&gt;Yes, but can you share the actual rev values? We'll look into why the API isn't&amp;nbsp;accepting them.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 06:19:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87743#M2700</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T06:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87744#M2701</link>
      <description>&lt;P&gt;The exception had a string of the form: &amp;nbsp;{"invalid_revision/."}&lt;/P&gt;
&lt;P&gt;The revisions in the order of failing are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; 1512685407b&amp;nbsp; &amp;nbsp; &amp;nbsp;1452685407b &amp;nbsp; &amp;nbsp;1442685407b&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 07:15:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87744#M2701</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-09T07:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87745#M2702</link>
      <description>&lt;P&gt;Thanks! With those, I was able to track down the conditions necessary to reproduce this. We'll work on a fix.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 08:36:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87745#M2702</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T08:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87746#M2703</link>
      <description>&lt;P&gt;This should be working properly now.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 01:51:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87746#M2703</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-14T01:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87747#M2704</link>
      <description>&lt;P&gt;Was this a server side issue ? Or do I need a new version of the API ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 11:42:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87747#M2704</guid>
      <dc:creator>Richard T. S.</dc:creator>
      <dc:date>2016-01-14T11:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Undelete a File via the API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87748#M2705</link>
      <description>&lt;P&gt;This was a server-side issue, so it should work now with the same version of the SDK. Please give it a try and let us know if you run in to any issues.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 14:44:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Undelete-a-File-via-the-API/m-p/87748#M2705</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-14T14:44:53Z</dc:date>
    </item>
  </channel>
</rss>

