从存储桶中删除文件. Autodesk-forge [英] Deleting a file from bucket. Autodesk-forge
问题描述
从wip.dm.prod存储桶中删除文件时出现问题("errorCode":"AUTH-012").但是我可以使用-x GET而不是-x DELETE下载当前文件.
There are problem with deleting a file from wip.dm.prod bucket ("errorCode": "AUTH-012"). But I can download current file by using -x GET instead of -x DELETE.
我使用本教程-> https://developer.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-DELETE/.在下面附上示例.
I use this tutorial -> https://developer.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-DELETE/ . Attach an example below.
请求
curl
-v https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/de34f4c9-457c-4653-a9e4-8bbad12bf5ec.rvt
-X DELETE
-H "Authorization:Bearer G3fqI9NFKqJVN5MQy3yI0tGXXXXX"
响应
{
"developerMessage": "ACM check failed, user or calling service does not have access to perform this operation",
"userMessage": "",
"errorCode": "AUTH-012",
"more info": "http://developer.api.autodesk.com/documentation/v1/errors/AUTH-012"
}
可以请您检查一下并向我解释什么地方可能出问题吗?
Could you please check me and explain me what could be wrong?
推荐答案
对于文件删除,我们可以使用文件版本删除.
For file deleting we can use deleting of file version.
curl
-v https://developer.api.autodesk.com/data/v1/projects/{project_Id}/versions
-x POST
-H "Authorization:Bearer G3fqI9NFKqJVN5MQy3yI0tGXXXXX"
-H "Content-Type:application/vnd.api+json"
-d '{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "versions",
"attributes": {
"extension": {
"type": "versions:autodesk.core:Deleted",
"version": "1.0",
}
},
"relationships": {
"item": {
"data": {
"type": "items",
"id": "urn:adsk.___your_file_id__________"
}
}
}
}
}'
位置:
{project_Id}-是您的项目ID;
{project_Id} - is your project id;
"urn:adsk .___ your_file_id____________"-是您的文件ID.
"urn:adsk.___your_file_id__________" - is your file id.
这篇关于从存储桶中删除文件. Autodesk-forge的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!