Reputation: 88
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!
Upvotes: 0
Views: 420
Reputation: 7070
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'
Upvotes: 1
Reputation: 88
Turns out it's not possible... yet. 🤞I recieved a response from Autodesk Forge developers:
"Unfortunately that is not exactly possible for now but what I will do is to raise a feature request with Engineering and hopefully
Will let you know if they need more info to assess our request. Thanks!"
Thank you everyone who helped!
Upvotes: 0
Reputation: 367
I am not too sure what you are trying to achieve as I am not super familiar with BIM 360. However, could you get what you are looking for by using theses from the Forge Data Management API?
From the Hubs API, you should be able to get the list of Hubs a user have access to: https://forge.autodesk.com/en/docs/data/v2/reference/http/hubs-GET/
You can also check permissions for a user using the CheckPermission API: https://forge.autodesk.com/en/docs/data/v2/reference/http/CheckPermission/
Upvotes: 2