API - How to check if a folder is in the deleted items bin?

27307

Using the API how can I check this? If I use the /api/2/folders/folderID I can see a <location> with contents start start with "Deleted items &gt; ". Do I check this or is there a better way?

Parents
  • I did ask the highq support team about that (checking the text in the location field in the response), and while it should work in almost all the cases, it wasn't necessarily designed for that. For example, if a person manually created a folder not in the recycle bin, but also calls it "Deleted items" and put the target folder in that, then it would result in a false positive.

    I think a more efficient way for this is to check the parent folder id of the target folder, and keep repeating checking the parent folder id, until you hit the root which you then check if that is the recycle bin folder or not by comparing that recycle bin folder id.

Reply
  • I did ask the highq support team about that (checking the text in the location field in the response), and while it should work in almost all the cases, it wasn't necessarily designed for that. For example, if a person manually created a folder not in the recycle bin, but also calls it "Deleted items" and put the target folder in that, then it would result in a false positive.

    I think a more efficient way for this is to check the parent folder id of the target folder, and keep repeating checking the parent folder id, until you hit the root which you then check if that is the recycle bin folder or not by comparing that recycle bin folder id.

Children
No Data