Web API for User Management
This page describes Web API operations for managing users, groups, roles and permissions. See more information how roles and permissions work in QPR ProcessAnalyzer.
The user management API uses the following entities.
User/group entity describes both users and groups. Properties:
- Id (integer): user/group id.
- IsGroup (boolean): false for users, true for groups.
- LoginName (string): user login name. Empty/ignored for groups.
- FullName (string): user/group full name.
- Email (string): user/group email address.
- Password (string): user password. Used only when creating or updating users.
- IsActive (boolean): flag whether user/group is active.
- Description (string): user/group description.
Role assignment entity describes that a role is given to a certain user/group. Note that role assignments don't have own id's, but they are identified by the combinations of all their property values. Properties:
- Id (integer): user/group id.
- ProjectId (integer): project id used in project-specific role assignments. Not used for global permissions.
- RoleId (integer): role id.
Membership entity describes that a user belongs to a group. Note that memberships don't have own id's, but memberships are identified by the combinations of all their property values. Properties:
- GroupId (integer): parent (container) group id.
- MemberId (integer): child (member) user/group id.
- RoleName (string): Type of the membership. Supported types are Member, HiddenMember, Administrator.
Role entity describes a role in the system. Properties:
- Id (integer): role id.
- Name (string): role name.
- IsGlobal (boolean): true for global role, false for project-specific-only role. Note that a role can be both global and user-specific.
- IsProject (boolean): true for project-specific role, false for global-only role. Note that a role can be both global and user-specific.
- For all methods, both the request and response Content-Type header is application/json;charset=UTF-8.
- In requests, there needs to be a header Authorization for authentication containing syntax Bearer <access token>.
User and group entities
Gets a list of users/group entities. Can be an empty array if criteria specified by parameters is not matched. Supported query parameters:
- isGroup (boolean): if false, only users are returned; if true, only groups are returned. If omitted, both users and groups are returned.
- isActive (boolean): if false or omitted, all users/groups are returned; if true, only active users/groups are returned.
Gets information of the user/group with given id. Returns the user/group object. Can return null if a user/group is not found.
Creates a new user/group. Takes a user/group object in the body. Note that the id property is ignored if specified. Returns the id of the created user/group.
Updates an existing user/group. Takes a user/group object in the body. Note that the isGroup property is ignored, because users cannot be changed to groups and vice versa.
Gets a list of memberships of the user/group with given id. For a user, the method returns in which groups the user belongs to, and for a group the method returns users belonging to the group. Returns an array of membership objects, which can be empty if user/group is not a member of any group.
Adds a membership. Takes a membership object in the body.
Deletes a membership. Takes a membership object in the body.
Gets a list of role assignments of a user/group with the given id. Returns an array of role assignment objects.
Adds a role assignment. Takes a role assignment object in the body.
Deletes a role assignment. Takes a role assignment object in the body.
Gets a list of all roles in the system. Returns an array of role objects.