Mandi Bishop
Mandi Bishop

Reputation: 27

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"
                }
            }
        }]

Upvotes: 0

Views: 185

Answers (1)

Mandi Bishop
Mandi Bishop

Reputation: 27

The json attribute.hidden = true seems to indicate deleted. This can be accessed via the filter[hidden] = true. I'm closing this as the correct answer.

Upvotes: 0

Related Questions