Get details about a specific user
By default it will lookup users by userId. To lookup by username or email pass in the second parameter {lookupType}. Specify the special value 'me' to get details of the authenticated user
userId, username or email
Optionaloptions: DetailsOptionsthe lookup type {lookupType: 'username'} as well as any additional request options
const rev = new RevClient(...config...);
await rev.connect();
// get details of the current user
let user = await rev.user.details('me');
// { userId: '<guid>', username: 'string', email: 'string', ... }
// now get the same user record, just change the lookup criteria
console.log('looking up by id', user.userId);
user = await rev.user.details(user.userId);
console.log('looking up by username', user.username);
user = await rev.user.details(user.username, { lookupType: 'username' });
console.log('looking up by email', user.email);
user = await rev.user.details(user.email, { lookupType: 'email' });
use updated signature details(userLookupValue, {lookupType: 'userId' | 'username' | 'email'}) instead
Upload a profile image for a given user. Only account admins can upload user profile image.
use PATCH API to add user to the specified group https://revdocs.vbrick.com/reference#edituserdetails
id of user in question
Check if user exists in the system. Instead of throwing on a 401/403 error if
user does not exist it returns false. Returns user details if does exist,
instead of just true
userId, username, or email
Optionaltype: DetailsLookupUser if exists, otherwise false
get user details by email address
use user.details() with {lookupType: 'email'}
get user details by username
use user.details() with {lookupType: 'username'}
OptionalsortField: LoginReportSortOptionalsortOrder: SortDirectionUse the Details API to get information about currently logged in user
OptionalrequestOptions: RequestOptionsuse PATCH API to add user to the specified group https://revdocs.vbrick.com/reference#edituserdetails
id of user in question
search for users based on text query. Leave blank to return all users.
OptionalsearchText: stringOptionaloptions: AccessEntitySearchOptions<User.SearchHit> = {}
User API methods
See
User API Docs