是否可以使用API​​删除或覆盖BIM360文档中的文档? [英] Is it possible to delete or overwrite document in BIM360 Docs using API?

查看:54
本文介绍了是否可以使用API​​删除或覆盖BIM360文档中的文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们将文档上载到BIM360 docs文件夹中时,如果该文档已经存在,则不会被覆盖.

When we upload the document in BIM360 docs folder, the document is not overwritten if it exists already.

我们想要做的是,如果文档已经存在.然后应该将上传代码覆盖文档.或删除现有文档并上传新文档.

What we want to do is, if a document already exists. then upload code should be overwritten the document. Or delete the existed document and upload a new one.

我们尚未找到任何可以删除BIM360文档的API.

We have not found any API which can delete BIM360 docs.

推荐答案

要从BIM360 Docs文件夹中删除项目,请致电

To remove items from BIM360 Docs' folder, please call POST projects/:project_id/versions with this body and fresh your web browser if you're opening the folder page that contains this item, then you will see it has been moved into "Deleted Items":

{ 
   "jsonapi":{ 
      "version":"1.0"
   },
   "data":{ 
      "type":"versions",
      "attributes":{ 
         "extension":{ 
            "type":"versions:autodesk.core:Deleted",      //!<<< The key of this action
            "version":"1.0"
         }
      },
      "relationships":{ 
         "item":{ 
            "data":{ 
               "type":"items",
               "id":"{{ItemId}}"                          //!<<< e.g. urn:adsk.wipprod:dm.lineage:8ucohSiktGeEqDn4SX75cA of id of the item you want to delete
            }
         }
      }
   }
} 

注意.确实无法删除上传到BIM360 Docs上的文件,在调用此API或单击BIM360 Web UI上的删除按钮后,所有文件都只是被隐藏或移动到已删除邮件"中.

Note. Files uploaded onto BIM360 Docs are not deletable really, all of them are just hidden or moved into the "Deleted Items" after calling this API or clicking delete button on the BIM360 Web UI.

这篇关于是否可以使用API​​删除或覆盖BIM360文档中的文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆