Creating Users with Glue API
07/02/2015
Automating user creation for a given project seems to be one common task using Glue API.
Q. We want to create users for a certain Glue project programmatically. I looked at User Service APIs. But I cannot find a web service call to do this. Is it possible to create users using API?
A. Yes, it is possible. The following two calls are needed to invite a new user to a project:
- Invite a new user to company/host
https://b4.autodesk.com/api/security/v1/invite/doc
This takes an e-mail address as a parameter (along with common signing parameters), and sends an invitation email for the user. Save the user_id from the response. You will need it in the next step.
Note: After receiving an invitation e-mail, the user will need to create Autodesk ID and/or login using the existing Autodesk ID. Until the user accepts the invitation, the account is treated as non-active.
- Add the user to the project roster
https://b4.autodesk.com/api/project/v1/user/add/doc
This takes a project_id and user_id as parameters. This should work regardless of whether the user has accepted the invitation or not.
To obtain a project_id, you can use /project/v1/list and choose one from the list of projects:
https://b4.autodesk.com/api/project/v1/list/doc
In addition to above, if you want to add an existing user to a new project, you can check the company roster and obtain the user_id:
- Get company roster
https://b4.autodesk.com/api/user/v1/company_roster/doc
This allows you to check if the user has been added to the project roster.
If you need to resend the invitation, you can use this:
- Resend invite to a previously invited user
https://b4.autodesk.com/api/security/v1/invite_repeat/doc
The parameter proxy_user_id is the same as user_id in user/v1/company_roster response.
Mikako