Package com.dtsx.astra.sdk.org
Class UsersClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.org.UsersClient
Client to work with Users.
-
Field Summary
Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, token -
Constructor Summary
ConstructorsConstructorDescriptionUsersClient(String token) As immutable object use builder to initiate the object.UsersClient(String token, ApiLocator.AstraEnvironment env) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete a role from its id.voiddeleteByEmail(String userEmail) Delete a user from its email.booleanCheck if a role is presentbooleanexistByEmail(String userEmail) Delete a user from its email.Retrieve user information from its id.findAll()List users in organization.findByEmail(String email) Retrieve a suer from his email.Endpoint to access schema for namespace.voidInvite a user.voidupdateRoles(String userId, String... roles) Replace roles of users.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getToken, HEAD, PATCH, POST, POST, PUT
-
Constructor Details
-
UsersClient
As immutable object use builder to initiate the object.- Parameters:
token- authenticated token
-
UsersClient
Constructor.- Parameters:
token- current token.
-
-
Method Details
-
findAll
List users in organization.- Returns:
- list of roles in target organization.
-
find
Retrieve user information from its id.- Parameters:
userId- user identifier- Returns:
- user information
-
findByEmail
Retrieve a suer from his email.- Parameters:
email- user email- Returns:
- user iif exist
-
exist
Check if a role is present- Parameters:
userId- user identifier- Returns:
- iif the user exists
-
existByEmail
Delete a user from its email.- Parameters:
userEmail- user emails- Returns:
- if the user exists
-
delete
Delete a role from its id.- Parameters:
userId- user identifier
-
deleteByEmail
Delete a user from its email.- Parameters:
userEmail- user emails
-
invite
Invite a user.- Parameters:
email- user emailroles- list of roles to assign
-
updateRoles
Replace roles of users.- Parameters:
userId- user identifierroles- replace existing roles of a user
-
getEndpointUsers
Endpoint to access schema for namespace.- Returns:
- endpoint
-