Forge模型派生试图通过外部IDID获取对象属性失败,但可以与ObjectID一起使用
使用此模型衍生物端点我们想通过使用其外部ID调用对象来检索对象的属性。我们遵循解释的过程
在这种情况下,端点使用objectID来起作用,在这种情况下:
"data": {
"type": "properties",
"collection": [
{
"objectid": 3,
"name": "Finished Ceiling Height",
"externalId": "5d365ed4-cccc-4589-b4e1-a8c5c744672a-0046dd63",
"properties": {
"General": {
"Override": ""
},
"Extents": {
"Scope Box": "None"
},
"Constraints": {
"Elevation": "8.667 ft-and-fractional-in",
"Story Above": "Default"
},
"Dimensions": {
"Computation Height": "3.000 ft-and-fractional-in"
},
"Identity Data": {
"Name": "Finished Ceiling Height",
"Structural": "No",
"Building Story": "Yes",
"Asset ID": "",
"Asset Location": "",
"Asset Category": "",
"Workset": "Shared Views, Levels, Grids",
"Edited by": ""
}
}
}
]
}
}
文档指出我们也可以使用externexit来获得相同的结果。
如果再次将设计转换为SVF或SVF2,则可以更改对象的对象。如果您需要持续的ID来引用对象,请使用外部ID。
但是更改ObjectId = 3 to Objectid = 5D365ED4-CCCC-4589-B4E1-A8C5C7444672A-0046DD63 返回错误400:
{
"diagnostic": "Invalid 'objectid' parameter"
}
我们还试图将GUID转换为base64,而不是objectid作为参数名称。一切都具有相同的结果。
有什么想法吗?我们在错过文档吗?
注意:目前还不是一个选择,也不是下载sqlite/json文件
[edit 1] 我们尝试将查询参数设置为外部INTERCENID/externalId接收相同的结果。
curl --location --request GET 'https://developer.api.autodesk.com/modelderivative/v2/designdata/urn/metadata/guid/properties?externalId=43f2c4e0-d09b-4151-a349-1b6f684411c6-004c8717' \
--header 'x-ads-force: true' \
--header 'x-ads-derivative-format: fallback' \
--header 'Authorization: Bearer XXXXXXX
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ObjectID参数仅接受数值。从API响应中可以看到,ObjectID是数值。不幸的是,您不能将字符串传递给此参数。
但是,我们的工程团队正在研究支持更多过滤器的新物业API。您可能对 20分钟。
The objectId parameter accepts numerical values only. As you can see from the API response, objectId is a numerical value. You cannot pass a string to this parameter, unfortunately.
However, our engineering team is working on the new property API which supports more filters. You might be interested in the new property metadata API mentioned in https://www.autodesk.com/autodesk-university/class/Forge-Road-Map-2021 at 20 mins.