Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi All,
Newer to Dropbox development so my apologies for any noobishness. I haven't seen another solution on stackoverflow or this forum.
I'm attempting to list out all files and folders that have been soft-deleted, including shared items. My solution successfully lists out non-shared items and I can list out shared items but not items that are both deleted and shared. Is this something I'm doing or an issue with the API?
Here's a source excerpt...
DbxUserSharingRequests sharing = client.sharing();
ListFoldersResult listSharedFolderResults = sharing.listFolders();
List<SharedFolderMetadata> sharedFolders = listSharedFolderResults.getEntries();
for(SharedFolderMetadata sharedFolder : sharedFolders) {
System.out.println("Found shared folder: " + sharedFolder.toStringMultiline());
}
ListSharedLinksResult listSharedFileResults = sharing.listSharedLinksBuilder().withDirectOnly(false).start();
List<SharedLinkMetadata> sharedFiles = listSharedFileResults.getLinks();
for(SharedLinkMetadata sharedFile : sharedFiles) {
System.out.println("Found shared file: " + sharedFile.toStringMultiline());
}
Any thoughts on this very welcome!
Thanks,
Dan
Hi Dan, by "soft-deleted", do you mean files that have been deleted but not permanently deleted?
If so, it sounds like you're looking for ListFolderBuilder using withIncludeDeleted(true), and listFolderContinue (in the files namespace).
Using those, you can list out (in a paginated fashion) all of the files and folders in the account, whether or not they're deleted. You can get the basic sharing information for each Metadata in the sharingInfo field. You can then call the relevant sharing methods if you need more information about them.
Hope this helps! Let me know if I've misunderstood though.
Hi there!
If you need more help you can view your support options (expected response time for a 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!