0
根據this example,我使用JSON體通過郵遞員調用POST文件夾方法。但是我只收到「400錯誤請求」的消息,沒有任何解釋。這是我的要求是什麼樣子:Autodesk BIM360:文件夾創建返回400錯誤的請求
服務地址:
https://developer.api.autodesk.com/data/v1/projects/b.5823d0b2-0000-0000-00/commands
的HTTP頭
Authorization: Bearer 2_legged_token
Content-Type: application/vnd.api+json
的JSON-身體
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "commands",
"attributes": {
"extension": {
"type": "commands:autodesk.core:CreateFolder",
"version": "1.0.0",
"data": {
"requiredAction": "create"
}
}
},
"relationships": {
"resources": {
"data": [
{
"type": "folders",
"id": "1"
}
]
}
}
},
"included": [
{
"type": "folders",
"id": "1",
"attributes": {
"name": "test",
"extension": {
"type": "folders:autodesk.bim360:Folder",
"version": "1.0.0"
}
},
"relationships": {
"parent": {
"data": {
"type": "folders",
"id": "urn:adsk.wipprod:fs.folder:co.Ai*****"
}
}
}
}
]
}
響應
{
"jsonapi": {
"version": "1.0"
},
"errors": [
{
"id": "f1266e76-a37e-400b-bff6-de84b11cdb00",
"status": "400",
"detail": "BadRequest"
}
]
}
我迄今發現:
- 項目編號是正確的。當我採用錯誤的項目ID時,我收到一個不同的錯誤。
- Json也有效。
- 當我(肯定)錯誤的父文件夾 - 缸我會收到相同的錯誤信息。所以也許這是一個錯誤的urn格式或什麼?
謝謝。現在它正在工作。我想只有創建它的用戶纔會看到該文件夾?還是項目中的每個人都會看到它? –
除非您指定不同/特定的訪問權限,否則文件和文件夾是項目明智的。 –
非常感謝 –