简体   繁体   English

使用 Autodesk forge 重命名 BIM 360 中的项目

[英]Rename items in BIM 360 using autodesk forge

We are upgrading our revit projects from 2020 to 2022 and our revit file names end with the version they belong to for easy identification ( xxxx_R20.rvt) and we'd like to rename all the items in the project to xxxx_R22.rvt.我们正在将我们的 revit 项目从 2020 升级到 2022,我们的 revit 文件名以它们所属的版本结尾以便于识别 (xxxx_R20.rvt),我们希望将项目中的所有项目重命名为 xxxx_R22.rvt。 I have been able to gather all the items, their names and their URNs for a patch... but the patch item throws an error saying :我已经能够为一个补丁收集所有项目、它们的名称和它们的 URN ......但是补丁项目抛出一个错误说:

{ "jsonapi": { "version": "1.0" }, "errors": [ { "id": "5f1b5519-3118-4c43-80f4-97c412419acf", "status": "403", "code": "USER_NOT_AUTHENTICATED", "detail": "The client_id is not whitelisted for schema 'items:autodesk.bim360:C4RModel' access." {“jsonapi”:{“版本”:“1.0”},“错误”:[{“id”:“5f1b5519-3118-4c43-80f4-97c412419acf”,“状态”:“403”,“代码”:“ USER_NOT_AUTHENTICATED", "detail": "client_id 未列入架构 'items:autodesk.bim360:C4RModel' 访问的白名单。" } ] } } ] }

The forge client id does have access to the account and has been used to make many other changes... I did try using the patch from versions to make the change to the name with no luck ... ( I receive the same error)伪造客户端 ID 确实可以访问该帐户并已用于进行许多其他更改...我确实尝试使用版本中的补丁来更改名称但没有运气...(我收到相同的错误)

Any and all help is appreciated, Thank you!任何和所有的帮助表示赞赏,谢谢!

You can not rename the file by PATCH item API, actually, you need to create a new version with the new file name, but you don't have to upload file again.您不能通过 PATCH item API 重命名文件,实际上,您需要使用新文件名创建一个新版本,但您不必再次上传文件。 Please try the following api:请尝试以下 api:

POST /versions?copyFrom={tip_version_urn} POST /versions?copyFrom={tip_version_urn}

{
    "jsonapi": {
        "version": "1.0"
    },
    "data": {
        "type": "versions",
        "attributes": {
            "name": "newName"
        }
    }
}

A new tip version will be created and its properties - including source file - depends on the copyFrom version you provide, usually it is the tip version.将创建一个新的提示版本,其属性(包括源文件)取决于您提供的 copyFrom 版本,通常是提示版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM