Tuesday, May 27, 2014

Autodesk Vault Programmer's Cookbook. 4. Users




Navigation:

|
|

Vault API provides a number of methods for working with users. They're located in AdminService service. With next pivot table you can get an overview of this methods.

Operation
Object
Option
Name
Add
User
AddUser
ToGroup
AddUserToGroup
Users
ToGroup
AddUsersToGroup
UserRole
AddUserRole
Delete
User
FromGroup
DeleteUserFromGroup
Users
FromGroup
DeleteUsersFromGroup
UserRole
DeleteUserRole
Get
Permissions
ByUserId
GetPermissionsByUserId
Roles
ByUserId
GetRolesByUserId
User
ByUserId
GetUserByUserId
AllUsers
GetAllUsers
CreateDomainUserOnLogin

GetCreateDomainUserOnLogin
MemberUsers
ByGroupId
GetMemberUsersByGroupId
UserInfo
ByUserId
GetUserInfoByUserId
UserInfos
ByUserIds
GetUserInfosByUserIds
Set
CreateDomainUserOnLogin

SetCreateDomainUserOnLogin
Update
User
UpdateUser
UserInfo
UpdateUserInfo


To call the method in relation to a particular user - or users - enough to know their names or IDs. This information is stored in the class User. It has next fields:

Name
Description
Auth
The authentication type.
CreateDate
The date that the user was created.
CreateUserId
The user that created this user.
Email
The email address of the user.
FirstName
The first name of the user.
Id
A unique number that the Vault uses to reference the user.
IsActive
If false, the user account is inactive, and the user cannot log in.
IsSys
If true, the user is a system user.
LastName
The last name of the user.
Name
The login name of the user.  

User class is inbound for UserInfo class, which has the following fields:

Name
Description
Roles
An array of Role objects associated with this user.
User
The userId of the user.
Vaults
An array of KnowledgeVault objects associated with this user.

Remember this distribution when you're working with users. It should also be noted that the User field returns object IDs instead of object reference - while you're working with Groups.