首页 > 解决方案 > Is there any data returned from the Forge Data Management Search api to indicate a model is deleted?

问题描述

When using GET projects/:project_id/folders/:folder_id/search, Forge Data Management API on a model with a deleted last version, is there a any information in the "attributes" or other returned data that indicates the file is deleted?

Currently, a second call to GET projects/:project_id/items/:item_id/versions is used to determine if the latest version is deleted (below) but it would be preferable to not call another request to get this information.

Returned JSON from /versions (with some data removed):

    "data": [{
        "type": "versions",
        "id": "urn:adsk.wipprod:fs.file:vf.w0cwXPUwQziKIHtKBtYRaA?version=3",
        "attributes": {
            "versionNumber": 3,
            "extension": {
                "type": "versions:autodesk.core:Deleted",
                "version": "1.0",
                "schema": {
                    "href": "https://developer.api.autodesk.com/schema/v1/versions/versions:autodesk.core:Deleted-1.0"
                },
                "data": {
                    "originalName": "**.rvt"
                }
            }
        }]

标签: autodesk-forgeautodesk-data-management

解决方案


json attribute.hidden = true 似乎表示已删除。这可以通过 filter[hidden] = true 访问。我将其作为正确答案关闭。


推荐阅读