0

when using https://developer.api.autodesk.com/data/v1/projects/:project_id/folders/:folder_id/search end point, I am receiving both deleted and non deleted documents. I know there are post stating using included.attributes.hidden would resolve the issue, however I noticed If you delete the parent folder of the document, the document included.attributes.hidden still shows false (not deleted).

I am thinking of work around to get the document full hierarchy of the searched folder then cross check it with the document parents to know if the document is deleted. Definitely going the recursive approach by calling parent of a parent till i reach the searched folder is not practical.
I need assistance in the following:
1- Is there a way to get the whole hierarchy under the searched folder.
2- Any other suggestion to know if a file is deleted.

  • So, the question is when the folder is deleted, included.attributes.hidden of the documents inside the folder is still false. Then if by filter hidden = true, it still returns the documents which have been deleted by folder deleting. I am able to reproduce this behavior. Please bear with me checking with engineer team – Xiaodong Liang Apr 28 '20 at 14:28

1 Answers1

0

After checking with engineer team, I got some comments:

It is as designed the documents/items are still hidden=false when the folder is deleted.

To dump whole hierarchy of folder, you may try with top folder and check subfolder recursively by GET:Folder Contents. Since GET:Folder Contents will tell if a folder is hidden or not, you could skip this folder (accordingly, skip the items inside the folder). By default, hidden items will not be returned. Finally build the folder & items tree.

If you search items by GET:Folder Search API, you would get those un-hidden items, yet its folder has been deleted, as you are experiencing. So you will have to double check if their folders are hidden or not. This means a tedious checking.

So I would suggest you build the tree from the top.

Xiaodong Liang
  • 2,051
  • 2
  • 9
  • 14