Autodesk Forge GET集线器返回我没有/当前使用的集线器

问题描述

我正在阅读教程(https://forge.autodesk.com/en/docs/data/v2/tutorials/publish-model/)以自动发布项目,并且在使用GET集线器时遇到了麻烦– 我目前正在使用邮递员,并使用此处的示例-https://forge.autodesk.com/blog/3-legged-authentication-postman

设置了一个3足的auth令牌,该令牌具有data:read,data:write和data:create

我使用GET users / @ me得到正确的回复(见下文)。因此,我认为身份验证工作正常。

    "userId": "**OBSCURED**","userName": "shane@**OBSCURED**","emailId": "shane@**OBSCURED**","firstName": "Shane","lastName": "**OBSCURED**","emailVerified": true,"2FaEnabled": false,"countryCode": "US","language": "en","optin": false,"lastModified": "2020-09-08T19:31:48.802","profileImages": {
        "sizeX20": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x20.jpg?r=**OBSCURED**","sizeX40": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x40.jpg?r=**OBSCURED**","sizeX50": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x50.jpg?r=**OBSCURED**","sizeX58": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x58.jpg?r=**OBSCURED**","sizeX80": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x80.jpg?r=**OBSCURED**","sizeX120": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x120.jpg?r=**OBSCURED**","sizeX160": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x160.jpg?r=**OBSCURED**","sizeX176": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x176.jpg?r=**OBSCURED**","sizeX240": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x240.jpg?r=**OBSCURED**","sizeX360": "https://s3.amazonaws.com:443/com.autodesk.storage.public.production/oxygen/**OBSCURED**/profilepictures/x360.jpg?r=**OBSCURED**"
    },"ldapInfo": {
        "ldapEnabled": false
    },"socialUserInfoList": []
}

当我尝试使用相同的令牌获取集线器时(使用此处https://forge.autodesk.com/en/docs/data/v2/reference/http/hubs-GET/的开发人员文档),我得到的响应如下所示。我希望看到docs.bim360.autodesk.com项目中列出的帐户,如下面的屏幕快照所示。我在网上阅读,有时需要由Autodesk进行配置才能显示正确的内容-似乎这些是我不再使用的集线器,并且已经在我们的bim360帐户的早期阶段建立了(我相信这些集线器是反映了我们的第一个b360项目以及我设置的测试项目。

我也尝试过获得下面列出的具有中心ID的项目,但是出现404错误,表明它们不存在。

我也不确定响应末尾的警告是否是我要查找的两个中心,因为我的请求输入错误或其他原因。我得到200英镑的赔偿,但好像找不到我想要的东西。

{
    "jsonapi": {
        "version": "1.0"
    },"links": {
        "self": {
            "href": "https://developer.api.autodesk.com/project/v1/hubs"
        }
    },"data": [
        {
            "type": "hubs","id": "a.YnV**OBSCURED**NjU","attributes": {
                "name": "**OBSCURED**","extension": {
                    "type": "hubs:autodesk.core:Hub","version": "1.0","schema": {
                        "href": "https://developer.api.autodesk.com/schema/v1/versions/hubs:autodesk.core:Hub-1.0"
                    },"data": {}
                },"region": "US"
            },"links": {
                "self": {
                    "href": "https://developer.api.autodesk.com/project/v1/hubs/a.YnVz**OBSCURED**uNjU"
                }
            },"relationships": {
                "projects": {
                    "links": {
                        "related": {
                            "href": "https://developer.api.autodesk.com/project/v1/hubs/a.YnVza**OBSCURED**uNjU/projects"
                        }
                    }
                }
            }
        },{
            "type": "hubs","id": "a.YnVz**OBSCURED**ltNQ","attributes": {
                "name": "shane","links": {
                "self": {
                    "href": "https://developer.api.autodesk.com/project/v1/hubs/a.YnVz**OBSCURED**tNQ"
                }
            },"relationships": {
                "projects": {
                    "links": {
                        "related": {
                            "href": "https://developer.api.autodesk.com/project/v1/hubs/a.YnVz**OBSCURED**ltNQ/projects"
                        }
                   }
                }
            }
        }
    ],"meta": {
        "warnings": [
            {
                "Id": null,"HttpStatusCode": "403","ErrorCode": "BIM360DM_ERROR","Title": "Unable to get hubs from BIM360DM US.","Detail": "You don't have permission to access this API","AboutLink": null,"Source": [],"meta": []
            },{
                "Id": null,"Title": "Unable to get hubs from BIM360DM EMEA.","meta": []
            }
        ]
    }
}

这是我在docs.b360.autodesk.com门户中看到的内容

enter image description here

我了解这项权利吗,在上述屏幕截图中,集线器是“帐户”吗?项目是那些帐户/集线器中列出的项目吗?

解决方法

要查看您的BIM360帐户是否在各中心中列出,您确实必须为每个Forge应用provision the access

是的,在GET hubs调用的响应中,BIM360“帐户”将显示为单独的“集线器”(以b.开头)。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...