问题
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.
We have not found any API which can delete BIM360 docs.
回答1:
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
}
}
}
}
}
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.
来源:https://stackoverflow.com/questions/53967455/is-it-possible-to-delete-or-overwrite-document-in-bim360-docs-using-api