Search code examples
autodesk-forgeautodesk-bim360

Is there API to GET project users' services access?


Is there a way to get which services users have access to in a/all project/s? If so, is the best approach from Account -> Projects -> Users -> Services OR Users/Members -> Projects -> Services?

Thank you!


Solution

  • Update 2020/03/30

    Project User API is under beta https://forge.autodesk.com/blog/get-project-users-bim-360-finally-here, please have a try, thanks!

    =========End line=======

    I'm not 100% sure about the services you mentioned, But here is a workaround for obtaining the project list of a specific user:

    1.Call GET Account users to get uid of a user

    [
      {
        "id": "a75e8769-621e-40b6-a524-0cffdd2f784e",
        //...
        "name": "John Smith",
        "nickname": "Johnny",
        "first_name": "John",
        "last_name": "Smith",
        "uid": "L9EBJKCGCXBB",        //!<<< The value is going to pass to x-user-id
        //...
      }
    ]
    

    2.Call GET hubs/:hub_id/projects with a request header x-user-id to get projects that a user belongs to

    curl -X GET \
      https://developer.api.autodesk.com/project/v1/hubs/{HUD_ID}/projects \
      -H 'Content-Type: application/json' \
      -H 'cache-control: no-cache' \
      -H 'x-user-id: L9EBJKCGCXBB'