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
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:
class UsersMain:
@staticmethod
async def run():
bdk_config = BdkConfigLoader.load_from_file("path/to/config.yaml")
async with SymphonyBdk(bdk_config) as bdk:
users_service = bdk.users()
users = await users_service.list_users_by_ids([123, 456])
print(users)
if __name__ == "__main__":
asyncio.run(UsersMain.run())