User API
The User Service is a component at the service layer of the BDK which covers the User part of the REST API documentation. More precisely:
- Create user
- Update user
- Suspend user
- Unsuspend user
- Get user details
- List all user details
- List users by ids
- List users by emails
- List users by usernames
- Search users
- Find users by filter
- Add role to user
- List roles
- Remove a role
- Get avatar
- Update avatar
- Get disclaimer
- Remove disclaimer
- Add disclaimer
- Get user delegates
- Update user delegates
- Get feature entitlements for a user
- Update feature entitlements for a user
- Get user status
- Update user status
- Follow a user
- Unfollow a user
- List user followers
- List followed users
- List audit trail
How to use
The central component for the User Service is the UserService
class, it exposes the service APIs endpoints mentioned above. The service is accessible from theSymphonyBdk
object by calling the users()
method:
@Slf4j
public class Example {
public static final Long USER_ID = 123456789L;
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get user details
UserService users = bdk.users();
V2UserDetail userDetail = users.getUserDetail(USER_ID);
log.info("User details: " + userDetail);
}
}