You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
deeuu
7 years agoExplorer | Level 4
Does DeletedMetadata expire?
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....
- 7 years agoDeletedMetadata 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.dropbox.Dropbox.files_list_folder
(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.)
Greg-DB
Dropbox Staff
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.dropbox.Dropbox.files_list_folder
(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.)
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.dropbox.Dropbox.files_list_folder
(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
7 years agoExplorer | Level 4
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-DB7 years agoDropbox StaffThe 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.
- deeuu7 years agoExplorer | Level 4
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
- deeuu7 years agoExplorer | Level 4
Okay I understand now.
I can succesfully retrieve DeletedMetadata for permanently deleted files when using an appropriate cursor.
The cursor is key!
Please ignore.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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!