Package com.atlan.api
Class UsersEndpoint
java.lang.Object
com.atlan.api.AbstractEndpoint
com.atlan.api.HeraclesEndpoint
com.atlan.api.UsersEndpoint
API endpoints for interacting with Atlan's users.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlan.api.AbstractEndpoint
AbstractEndpoint.RawResponse
-
Field Summary
Fields inherited from class com.atlan.api.AbstractEndpoint
client
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToGroups
(String id, List<String> groupIds) Add a user to one or more groups.void
addToGroups
(String id, List<String> groupIds, RequestOptions options) Add a user to one or more groups.void
changeRole
(String id, String roleId) Change the role of a user.void
changeRole
(String id, String roleId, RequestOptions options) Change the role of a user.void
Create a new user.Create a new user.create
(AtlanUser user, boolean returnUser, RequestOptions options) Create a new user.void
create
(AtlanUser user, RequestOptions options) Create a new user.void
Create multiple new users.Create multiple new users.create
(List<AtlanUser> users, boolean returnUsers, RequestOptions options) Create multiple new users.void
create
(List<AtlanUser> users, RequestOptions options) Create multiple new users.getByEmail
(String email) Retrieves all users with email addresses that contain the provided email.getByEmail
(String email, RequestOptions options) Retrieves all users with email addresses that contain the provided email.getByEmails
(List<String> emails) Retrieves all users with the email addresses provided.getByEmails
(List<String> emails, RequestOptions options) Retrieves all users with the email addresses provided.Retrieves the user with a unique ID (GUID) that exactly matches the provided string.getByGuid
(String guid, RequestOptions options) Retrieves the user with a unique ID (GUID) that exactly matches the provided string.getByUsername
(String user) Retrieves a user based on the username.getByUsername
(String user, RequestOptions options) Retrieves a user based on the username.getByUsernames
(List<String> users) Retrieves users based on a list of usernames.getByUsernames
(List<String> users, RequestOptions options) Retrieves users based on a list of usernames.Retrieve the current user (representing the API token).getCurrentUser
(RequestOptions options) Retrieve the current user (representing the API token).list()
Retrieve all users defined in Atlan.list
(int pageSize, RequestOptions options) Retrieve all users defined in Atlan.list
(UserRequest request) Retrieve users defined in Atlan.list
(UserRequest request, RequestOptions options) Retrieve users defined in Atlan.list
(RequestOptions options) Retrieve all users defined in Atlan.Retrieves a list of the users defined in Atlan.list
(String filter, RequestOptions options) Retrieves a list of the users defined in Atlan.Retrieves a list of the users defined in Atlan.list
(String filter, String sort, boolean count, int offset, int limit, RequestOptions options) Retrieves a list of the users defined in Atlan.listGroups
(String id) Retrieve the groups this user belongs to.listGroups
(String id, GroupRequest request) Retrieve the groups this user belongs to.listGroups
(String id, GroupRequest request, RequestOptions options) Retrieve the groups this user belongs to.listGroups
(String id, RequestOptions options) Retrieve the groups this user belongs to.listSessions
(String id) Retrieve the sessions for a given user.listSessions
(String id, RequestOptions options) Retrieve the sessions for a given user.Update a user.update
(String id, AtlanUser user, RequestOptions options) Update a user.Methods inherited from class com.atlan.api.HeraclesEndpoint
getBaseUrl
Methods inherited from class com.atlan.api.AbstractEndpoint
getBaseUrl
-
Field Details
-
DEFAULT_PROJECTIONS
-
-
Constructor Details
-
UsersEndpoint
-
-
Method Details
-
list
Retrieve users defined in Atlan.- Parameters:
request
- containing details about which users to retrieve- Returns:
- a list of the users in Atlan
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieve users defined in Atlan.- Parameters:
request
- containing details about which users to retrieveoptions
- to override default client settings- Returns:
- a list of the users in Atlan
- Throws:
AtlanException
- on any API communication issue
-
list
public UserResponse list(String filter, String sort, boolean count, int offset, int limit) throws AtlanException Retrieves a list of the users defined in Atlan.- Parameters:
filter
- which users to retrievesort
- property by which to sort the resultscount
- whether to return the total number of records (true) or not (false)offset
- starting point for results to return, for paginglimit
- maximum number of results to be returned- Returns:
- a list of users that match the provided criteria
- Throws:
AtlanException
- on any API communication issue
-
list
public UserResponse list(String filter, String sort, boolean count, int offset, int limit, RequestOptions options) throws AtlanException Retrieves a list of the users defined in Atlan.- Parameters:
filter
- which users to retrievesort
- property by which to sort the resultscount
- whether to return the total number of records (true) or not (false)offset
- starting point for results to return, for paginglimit
- maximum number of results to be returnedoptions
- to override default client settings- Returns:
- a list of users that match the provided criteria
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieves a list of the users defined in Atlan.- Parameters:
filter
- which users to retrieve- Returns:
- a list of users that match the provided criteria
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieves a list of the users defined in Atlan.- Parameters:
filter
- which users to retrieveoptions
- to override default client settings- Returns:
- a list of users that match the provided criteria
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieve all users defined in Atlan.- Returns:
- a list of all the users in Atlan
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieve all users defined in Atlan.- Parameters:
options
- to override default client settings- Returns:
- a list of all the users in Atlan
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieve all users defined in Atlan.- Parameters:
pageSize
- maximum number of users to retrieve per requestoptions
- to override default client settings- Returns:
- a list of all the users in Atlan
- Throws:
AtlanException
- on any API communication issue
-
getByEmail
Retrieves all users with email addresses that contain the provided email. (This could include a complete email address, in which case there should be at most a single item in the returned list, or could be a partial email address such as "@example.com" to retrieve all users with that domain in their email address.)- Parameters:
email
- on which to filter the users- Returns:
- all users whose email addresses contain the provided string
- Throws:
AtlanException
- on any error during API invocation
-
getByEmail
Retrieves all users with email addresses that contain the provided email. (This could include a complete email address, in which case there should be at most a single item in the returned list, or could be a partial email address such as "@example.com" to retrieve all users with that domain in their email address.)- Parameters:
email
- on which to filter the usersoptions
- to override default client settings- Returns:
- all users whose email addresses contain the provided string
- Throws:
AtlanException
- on any error during API invocation
-
getByEmails
Retrieves all users with the email addresses provided.- Parameters:
emails
- list of email addresses for which to retrieve users- Returns:
- all users who have one of the provided email addresses
- Throws:
AtlanException
- on any error during API invocation
-
getByEmails
public List<AtlanUser> getByEmails(List<String> emails, RequestOptions options) throws AtlanException Retrieves all users with the email addresses provided.- Parameters:
emails
- list of email addresses for which to retrieve usersoptions
- to override default client settings- Returns:
- all users who have one of the provided email addresses
- Throws:
AtlanException
- on any error during API invocation
-
getByUsername
Retrieves a user based on the username. (This attempts an exact match on username rather than a contains search.)- Parameters:
user
- the username by which to find the user- Returns:
- the user with that username
- Throws:
AtlanException
- on any error during API invocation
-
getByUsername
Retrieves a user based on the username. (This attempts an exact match on username rather than a contains search.)- Parameters:
user
- the username by which to find the useroptions
- to override default client settings- Returns:
- the user with that username
- Throws:
AtlanException
- on any error during API invocation
-
getByUsernames
Retrieves users based on a list of usernames. (This attempts an exact match on username rather than a contains search.)- Parameters:
users
- the usernames by which to find the users- Returns:
- the users with one of those usernames
- Throws:
AtlanException
- on any error during API invocation
-
getByUsernames
public List<AtlanUser> getByUsernames(List<String> users, RequestOptions options) throws AtlanException Retrieves users based on a list of usernames. (This attempts an exact match on username rather than a contains search.)- Parameters:
users
- the usernames by which to find the usersoptions
- to override default client settings- Returns:
- the users with one of those usernames
- Throws:
AtlanException
- on any error during API invocation
-
getByGuid
Retrieves the user with a unique ID (GUID) that exactly matches the provided string.- Parameters:
guid
- unique identifier by which to retrieve the user- Returns:
- the user whose GUID matches the provided string, or null if there is none
- Throws:
AtlanException
- on any error during API invocation
-
getByGuid
Retrieves the user with a unique ID (GUID) that exactly matches the provided string.- Parameters:
guid
- unique identifier by which to retrieve the useroptions
- to override default client settings- Returns:
- the user whose GUID matches the provided string, or null if there is none
- Throws:
AtlanException
- on any error during API invocation
-
create
Create a new user.- Parameters:
user
- the details of the new user- Throws:
AtlanException
- on any API communication issue
-
create
Create a new user.- Parameters:
user
- the details of the new useroptions
- to override default client settings- Throws:
AtlanException
- on any API communication issue
-
create
Create a new user.- Parameters:
user
- the details of the new userreturnUser
- if true, lookup and return the created user as well- Returns:
- the created user
- Throws:
AtlanException
- on any API communication issue
-
create
public AtlanUser create(AtlanUser user, boolean returnUser, RequestOptions options) throws AtlanException Create a new user.- Parameters:
user
- the details of the new userreturnUser
- if true, lookup and return the created user as welloptions
- to override default client settings- Returns:
- the created user
- Throws:
AtlanException
- on any API communication issue
-
create
Create multiple new users.- Parameters:
users
- the details of the new users- Throws:
AtlanException
- on any API communication issue
-
create
Create multiple new users.- Parameters:
users
- the details of the new usersoptions
- to override default client settings- Throws:
AtlanException
- on any API communication issue
-
create
Create multiple new users.- Parameters:
users
- the details of the new usersreturnUsers
- if true, lookup and return the created users as well- Returns:
- the created users
- Throws:
AtlanException
- on any API communication issue
-
create
public List<AtlanUser> create(List<AtlanUser> users, boolean returnUsers, RequestOptions options) throws AtlanException Create multiple new users.- Parameters:
users
- the details of the new usersreturnUsers
- if true, lookup and return the created users as welloptions
- to override default client settings- Returns:
- the created users
- Throws:
AtlanException
- on any API communication issue
-
update
Update a user. Note: you can only update users that have already signed up to Atlan. Users that are only invited (but have not yet logged in) cannot be updated.- Parameters:
id
- unique identifier (GUID) of the user to updateuser
- the details to update on the user- Returns:
- basic details about the updated user
- Throws:
AtlanException
- on any API communication issue
-
update
public UserMinimalResponse update(String id, AtlanUser user, RequestOptions options) throws AtlanException Update a user. Note: you can only update users that have already signed up to Atlan. Users that are only invited (but have not yet logged in) cannot be updated.- Parameters:
id
- unique identifier (GUID) of the user to updateuser
- the details to update on the useroptions
- to override default client settings- Returns:
- basic details about the updated user
- Throws:
AtlanException
- on any API communication issue
-
listGroups
Retrieve the groups this user belongs to.- Parameters:
id
- unique identifier (GUID) of the userrequest
- containing details about which groups to retrieve- Returns:
- groups this user belongs to
- Throws:
AtlanException
- on any API communication issue
-
listGroups
public GroupResponse listGroups(String id, GroupRequest request, RequestOptions options) throws AtlanException Retrieve the groups this user belongs to.- Parameters:
id
- unique identifier (GUID) of the userrequest
- containing details about which groups to retrieveoptions
- to override default client settings- Returns:
- groups this user belongs to
- Throws:
AtlanException
- on any API communication issue
-
listGroups
Retrieve the groups this user belongs to.- Parameters:
id
- unique identifier (GUID) of the user- Returns:
- groups this user belongs to
- Throws:
AtlanException
- on any API communication issue
-
listGroups
Retrieve the groups this user belongs to.- Parameters:
id
- unique identifier (GUID) of the useroptions
- to override default client settings- Returns:
- groups this user belongs to
- Throws:
AtlanException
- on any API communication issue
-
addToGroups
Add a user to one or more groups.- Parameters:
id
- unique identifier (GUID) of the user to add into groupsgroupIds
- unique identifiers (GUIDs) of the groups to add the user into- Throws:
AtlanException
- on any API communication issue
-
addToGroups
public void addToGroups(String id, List<String> groupIds, RequestOptions options) throws AtlanException Add a user to one or more groups.- Parameters:
id
- unique identifier (GUID) of the user to add into groupsgroupIds
- unique identifiers (GUIDs) of the groups to add the user intooptions
- to override default client settings- Throws:
AtlanException
- on any API communication issue
-
changeRole
Change the role of a user.- Parameters:
id
- unique identifier (GUID) of the user whose role should be changedroleId
- unique identifier (GUID) of the role to move the user into- Throws:
AtlanException
- on any API communication issue
-
changeRole
Change the role of a user.- Parameters:
id
- unique identifier (GUID) of the user whose role should be changedroleId
- unique identifier (GUID) of the role to move the user intooptions
- to override default client settings- Throws:
AtlanException
- on any API communication issue
-
getCurrentUser
Retrieve the current user (representing the API token).- Returns:
- minimalist details about the current user (API token)
- Throws:
AtlanException
- on any API communication issue
-
getCurrentUser
Retrieve the current user (representing the API token).- Parameters:
options
- to override default client settings- Returns:
- minimalist details about the current user (API token)
- Throws:
AtlanException
- on any API communication issue
-
listSessions
Retrieve the sessions for a given user.- Parameters:
id
- unique identifier (GUID) of the user whose sessions should be retrieved- Returns:
- the list of sessions for that user
- Throws:
AtlanException
- on any API communication issue
-
listSessions
Retrieve the sessions for a given user.- Parameters:
id
- unique identifier (GUID) of the user whose sessions should be retrievedoptions
- to override default client options- Returns:
- the list of sessions for that user
- Throws:
AtlanException
- on any API communication issue
-