cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Does DeletedMetadata expire?

Does DeletedMetadata expire?

deeuu
Explorer | Level 4
Go to solution

Hi,

 

I'm using the Python Dropbox SDK, and wondered about the lifetime of deleted metadata.

 

Does this metadata expire, e.g.  after 30 days as with deleted Dropbox files?

 

Many thanks.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
DeletedMetadata objects don't "expire" exactly, but whether or not old ones would still be returned (e.g., when calling files_list_folder/files_list_folder_continue again) after a significant period of time depends on a few specifics, based on the particular account's features, file activity, and some specifics of how the Dropbox backend works.

The guarantee that the API provides is that as long as you implement files_list_folder and files_list_folder_continue as documented, you'll end up with the correct state matching what's on the server:

https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html?highlight=download_to#dropbox.dro...

(You can even store cursors for long periods of time and call back to files_list_folder_continue later to retrieve just what changed in the interim.)

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution
DeletedMetadata objects don't "expire" exactly, but whether or not old ones would still be returned (e.g., when calling files_list_folder/files_list_folder_continue again) after a significant period of time depends on a few specifics, based on the particular account's features, file activity, and some specifics of how the Dropbox backend works.

The guarantee that the API provides is that as long as you implement files_list_folder and files_list_folder_continue as documented, you'll end up with the correct state matching what's on the server:

https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html?highlight=download_to#dropbox.dro...

(You can even store cursors for long periods of time and call back to files_list_folder_continue later to retrieve just what changed in the interim.)

deeuu
Explorer | Level 4
Go to solution

Thanks Greg.

 

But I guess that because state matching depends on DeletedMetadata, it is only guaranteed so long as the sync is performed regularly, right?

 

Otherwise, if old deleted files are not registered when calling files_list_folder (as DeletedMetadata), one cannot maintain the same state as on the server.

 

Final thoughts?

 

Thanks again

Greg-DB
Dropbox Staff
Go to solution
The amount of time between your calls to /list_folder[/continue] doesn't matter. The server will always return the entries necessary to make sure you get an accurate state based on the cursor you provide, as long as you process the entries as documented.

deeuu
Explorer | Level 4
Go to solution

@Greg-DB

Hi Greg,

 

I'm unable to retireve Deleted Metadata for deleted files/folders that are permanently deleted.

 

Doesn't this then mean that local state is only guaranteed to match that of the server, if the deleted file is still recoverable?

 

If so, then this is sort of what I was eluding to in my original post, in that Dropbox will permanently delete files after some time period, depending on the account type.

 

Let me know if I'm missing something.

 

Thanks again

deeuu
Explorer | Level 4
Go to solution

Okay I understand now.

 

I can succesfully retrieve DeletedMetadata for permanently deleted files when using an appropriate cursor.

 

The cursor is key! 

 

Please ignore.

Need more support?
Who's talking

Top contributors to this post

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