Forum Discussion

MarkMichaelis's avatar
MarkMichaelis
Explorer | Level 3
5 years ago

DeletedMetadata with ListRevisions

I use the Drpopbox API as follows:

  1. The `ListFolder` API returns an item of type `DeletedMetadata`.  
  2. The `ListRevisions` API returns 0 revisions for the same item (using the path)
  3. Restore the Item using the Dropbox Web UI
  4. Delete the same item using the Dropbox Web UI
  5. Retrieve the same item using the `ListFolder` API (returning a `DeletedMetadata` item again since the item was deleted)
  6. Now ListRevisions returns 2 revisions

Question: Why were not revisions returned in step 2 but in step 6 they were returned?

 

Thanks,

Mark

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Would you be able to share the relevant code and output for this so we can take a closer look? Be sure to redact your access token though.

     

    Also, how and when was the file deleted originally?

     

    Feel free to open an API ticket if you'd prefer to share privately. Thanks!

    • MarkMichaelis's avatar
      MarkMichaelis
      Explorer | Level 3

      Hi Greg,

       

      Thanks for following up.

       

      The code is available on a  fork of dbxcli.  Line 175 captures when there are no revisions on DeletedMetadata.

       

      I can't provide the time the file was originally deleted.  That only works when revisions are available but there are no revisions.

       

      Thanks,

      Mark

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        I'm not sure exactly what scenario you're running in to here. Can you share the output of these API calls so I can take a closer look?

         

        It may be easier to use the API v2 Explorer so you can see the API responses directly.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,949 PostsLatest Activity: 2 hours ago
352 Following

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 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!