cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

How to differentiate between file and folder delete in list_folder_continue call

How to differentiate between file and folder delete in list_folder_continue call

Akshata G.
Helpful | Level 5
Go to solution

Hi,

I am working on webhooks for dropbox and struggling to find a way to

differentiate between file and folder deletion for

https://api.dropboxapi.com/2/files/list_folder/continue API call.

 

Currently for both the events i am getting exactly similar kind of response. i.e,

File delete:

{
"entries": [
{
".tag": "deleted",
"name": "wufoo.txt",
"path_lower": "/aks/wufoo.txt",
"path_display": "/aks/wufoo.txt"
}
],
"cursor": "AAFNxhpvLTloozCzmLinTjKqxocwj8xHEIzdpD5CAyrmGqMTfqVN0sSPFgfOPpnJw8Ui3AJr77Z-KCKDxJy7H69vjra2gziI2r0bDOTUVu0EimPLmkuldr-a9BYGhVvhuudJhgcT5fvZ2cSgDYuUmGkN",
"has_more": false
}

 

Folder delete:

{
"entries": [
{
".tag": "deleted",
"name": "ghdgf.jhfgu",
"path_lower": "/aks/ghdgf.jhfgu",
"path_display": "/aks/ghdgf.jhfgu"
}
],
"cursor": "AAGcz8vqlv1sc4uQUPW6PG298WhxEKmqf_vLRnAeISnd9tkqPHzKIt64bCASrFo-WSfSFW7pBwFQ_HWZLl73d_psJESZu4aw93-RGfZciCDraB8d_7yZbrCyXDqD7eBAnkhUUW_teQo-pt1xgUYS5Pq7",
"has_more": false
}

 

And the webhook notification also doesnt contain any helpful information in this regard.

Is there any way to know the difference?

 

Any pointers on this would be of great help!.

 

Thanks in advance,

Akshata

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The API doesn't distinguish between files and folders in DeletedMetadata, but I'll be sure to pass this along as a feature request.

 

For reference though, a deleted entry just indicates that whatever was at that path was deleted, and at different points in time, a single path could have been either a file and folder. You may want to refer to whatever previous metadata you received for that path to see what was there.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

The API doesn't distinguish between files and folders in DeletedMetadata, but I'll be sure to pass this along as a feature request.

 

For reference though, a deleted entry just indicates that whatever was at that path was deleted, and at different points in time, a single path could have been either a file and folder. You may want to refer to whatever previous metadata you received for that path to see what was there.

Akshata G.
Helpful | Level 5
Go to solution
Thanks Greg for the quick reply!.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Akshata G. Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?