0

I'm attempting to access my Hubs through the data management API, for use with Viewer, and also to read/write BIM360 issues via Issues API. However, the GET request to https://developer.api.autodesk.com/project/v1/hubs is not returning all of the hubs that I have expected it to.

I originally thought there might be something outdated in the forge-apis npm module I've been installing in Node-js, so I tried using Postman to send a GET request directly to https://developer.api.autodesk.com/project/v1/hubs, using a 3-legged OAuth token, however this returns the same hubs.

The response includes hubs from the old BIM360 Teams, but seems to be missing hubs from BIM360 Design. The only BIM360 Design hub that appears is the one I am an admin of.

For reference, my data-management and authentication code essentially the same as the one available here: http://learnforge.autodesk.io/#/tutorials/viewhubmodels

The result to the GET request is as follows:

{
    "jsonapi": {
        "version": "1.0"
    },
    "links": {
        "self": {
            "href": "https://developer.api.autodesk.com/project/v1/hubs"
        }
    },
    "data": [
        {
            "type": "hubs",
            "id": "a.YnVxxx",
            "attributes": {
                "name": "xxx",
                "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": {}
                }
            },
            "links": {
                "self": {
                    "href": "https://developer.api.autodesk.com/project/v1/hubs/a.YnVxxx"
                }
            },
            "relationships": {
                "projects": {
                    "links": {
                        "related": {
                            "href": "https://developer.api.autodesk.com/project/v1/hubs/a.YnVzxxx/projects"
                        }
                    }
                }
            }
        },

3 of these and one of these:

"type": "hubs",
            "id": "b.211xxx",
            "attributes": {
                "name": "xxx",
                "extension": {
                    "type": "hubs:autodesk.bim360:Account",
                    "version": "1.0",
                    "schema": {
                        "href": "https://developer.api.autodesk.com/schema/v1/versions/hubs:autodesk.bim360:Account-1.0"
                    },
                    "data": {}
                }
            },
            "links": {
                "self": {
                    "href": "https://developer.api.autodesk.com/project/v1/hubs/b.211xxx"
                }
            },
            "relationships": {
                "projects": {
                    "links": {
                        "related": {
                            "href": "https://developer.api.autodesk.com/project/v1/hubs/b.211xxx/projects"
                        }
                    }
                }
            }
        }
    ],

followed by this warning:

"meta": {
        "warnings": [
            {
                "Id": null,
                "HttpStatusCode": "403",
                "ErrorCode": "BIM360DM_ERROR",
                "Title": "Unable to get hubs from BIM360DM EMEA.",
                "Detail": "You don't have permission to access this API",
                "AboutLink": null,
                "Source": [],
                "meta": []
            }
        ]
    }
}

However, https://forge.autodesk.com/blog/bim-360-docs-api-changes-access-data-european-data-center seems to suggest that data-management api should be unaffected by server locations being US or EMEA, so I don't understand the warning.

Is it possible that BIM360 Design hubs that do not have admin-permissions are not accessible via the data-management API?

The app has also been provisioned for BIM360 API, but I believe this will only affect the hub that I am admin of (can I get confirmation on this, as I also intend to at least view issues in non-admin hubs in future, preferably write issues).

  • so, it sounds your Forge app has provisioned with this specific BIM 360 hub, I assume when provisioned, the admin of the hub has specified what access level your App will receive (Account Administration, Docs or both). Then, it should return the hub, even though the logged user (by 3legged token) is not admin. Could you email to forge.help@autodesk.com with the related information of the hub? we can check in backend. As to "Unable to get hubs from BIM360DM EMEA.", normally it means your app has not provisioned with that EMEA hub. – Xiaodong Liang Jul 09 '19 at 03:34
  • Hi Xiaodong, I'm starting to get more of an understanding of the provisioning. I am getting the hub associated with the account which has provisioned the app. The issue is, when logging in BIM360 docs, there are other hubs/Accounts for which I only have permissions on a _single folder_ from each. These folder level permissions from other accounts do not seem to be available to my App as I have only provisioned the account for which I am the owner. I assume I need to get new provisions from each account holder for this app specifically. They can't give folder provisions for API can they? – John Haddadian Jul 09 '19 at 06:20
  • Hi John, firstly, I forgot to mention: when the logged user (by 3legged token) has not been added to any active project of a BIM hub, it looks the API GET:Hubs does not return the hub data with the 3legged token. I think this is why you failed to get hubs Secondly, currently the provisioning is for the app to access the categories of Admin/Docs. While the folder permissions will follow the setting of UI. The APIs to GET/SET permissions of folder is on the roadmap which would be available in near future – Xiaodong Liang Jul 09 '19 at 14:50

0 Answers0