autodesk-forge - 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"
}
}
}]
解决方案
json attribute.hidden = true 似乎表示已删除。这可以通过 filter[hidden] = true 访问。我将其作为正确答案关闭。
推荐阅读
- python - PowerShell:无法解码 JSON 对象:期望用双引号括起来的属性名称
- pandas - 与从 rpy2 获取 `POSIXct` 的 R 函数不一致
- headless - Headless Chrome - 共享凭证
- c# - 具有多个 DBContext 的存储库还是每个具有 DBContext 的多个存储库?
- mysql - MySQL中的`flag is TRUE`与`flag = TRUE`有什么区别?
- python - 如何使用 python 中的线程模块来处理同时的 http 请求?
- javascript - 从带有空格的 JSON 字符串中获取值
- java - java桌面飞扬的鸟克隆的libGDX构建失败
- python - Django - 无法将服务器作为 sudo 运行
- amazon-web-services - 将当前资源迁移到可重用的嵌套堆栈中