0

I am using the Forge Data Management search API below to retrieve all .rvt files in BIM360 Docs.

Search API

The returned JSON for included.attributes.hidden is true when a file itself is manually deleted in the BIM360 docs site. When a parent folder is deleted, the file doesn't return as hidden: true, but hidden: false. This applies also to parent folders of folders.

To accurately determine if a file is deleted or not using this logic, the code would have to search up the parent folder tree from the file to find if any hidden: true exists. I would like to avoid this.

Two options could be:

  • A better way to determine what is in the deleted items area? This might exist but I wasn't able to find this in the documentation
  • The children of the folder be marked as hidden: true when the parent is hidden (and vice versa)?

Are either of these cases doable or currently available?

Sample returned Json:

  "data": [{
    ],
    "included": [{
        {
            "type": "items",
            "id": "urn:adsk.wipprod:dm.lineage:***",
            "attributes": {
                "displayName": "r&b.rvt",
                "hidden": true,
                "reserved": false,
                "extension": {
                    "type": "items:autodesk.bim360:C4RModel",
                    "version": "1.0.0",
                    "data": {}
                }
            },
  • More information: One noticeable difference in the deleted folders is the pathInProject value returned from [Item GET API](https://forge.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-items-item_id-GET/) will return a path with a GUID as one of the subpaths when the folder is deleted. This doesn't feel like a very safe or reliable way to determine hidden files. I would prefer something more robust and dependable. – Mandi Bishop Dec 04 '19 at 16:39
  • Could you share more details regarding this issue? e.g. the example API call. I cannot reproduce this issue at my end. Thanks – Eason Kang Dec 06 '19 at 10:13
  • To reproduce: In BIM360 create a multi-level folder structure under Project Files with a revit file in the bottom level. Delete the top folder under Project Files. Then, use the Search api to get all the files from Project Files and below. How do we determine if the files are deleted as a result of the folder deletion? API: /data/v1/projects/" + a360Project.Id + "/folders/" + folderId + "/search" returns hidden : false for the attribute on the file. – Mandi Bishop Dec 09 '19 at 15:50

0 Answers0