public interface UserResources
This interface provides methods to access User resources.
Thread Safety: Implementation of this interface must be thread safe.
| Modifier and Type | Method and Description |
|---|---|
List<AlternateEmail> |
addAlternateEmail(long userId,
List<AlternateEmail> altEmails)
Add an alternate email.
|
User |
addProfileImage(long userId,
String file,
String fileType)
Uploads a profile image for the specified user.
|
User |
addUser(User user)
Add a user to the organization, without sending email.
|
User |
addUser(User user,
boolean sendEmail)
Add a user to the organization, without sending email.
|
void |
deleteAlternateEmail(long userId,
long altEmailId)
Delete an alternate email.
|
void |
deleteUser(long id,
DeleteUserParameters parameters)
Delete a user in the organization.
|
AlternateEmail |
getAlternateEmail(long userId,
long altEmailId)
Get alternate email.
|
UserProfile |
getCurrentUser()
Get the current user.
|
UserProfile |
getCurrentUser(EnumSet<UserInclusion> includes)
Get the current user.
|
UserProfile |
getUser(long userId)
Get the current user.
|
PagedResult<AlternateEmail> |
listAlternateEmails(long userId,
PaginationParameters pagination)
List all user alternate email(s).
|
PagedResult<Sheet> |
listOrgSheets(PaginationParameters pagination)
Deprecated.
|
PagedResult<Sheet> |
listOrgSheets(PaginationParameters pagination,
Date modifiedSince)
List all organisation sheets.
|
PagedResult<User> |
listUsers()
List all users.
|
PagedResult<User> |
listUsers(Set<String> email,
EnumSet<ListUserInclusion> includes,
PaginationParameters pagination)
List all users.
|
PagedResult<User> |
listUsers(Set<String> email,
PaginationParameters pagination)
List all users.
|
AlternateEmail |
promoteAlternateEmail(long userId,
long altEmailId)
Promote and alternate email to primary.
|
User |
updateUser(User user)
Update a user.
|
PagedResult<User> listUsers() throws SmartsheetException
List all users.
It mirrors to the following Smartsheet REST API method: GET /users
IllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationPagedResult<User> listUsers(Set<String> email, PaginationParameters pagination) throws SmartsheetException
List all users.
It mirrors to the following Smartsheet REST API method: GET /users
email - the list of email addressespagination - object containing pagination query parametersIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationPagedResult<User> listUsers(Set<String> email, EnumSet<ListUserInclusion> includes, PaginationParameters pagination) throws SmartsheetException
List all users.
It mirrors to the following Smartsheet REST API method: GET /users
email - the list of email addressesincludes - elements to include in responsepagination - object containing pagination query parametersIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationUser addUser(User user) throws SmartsheetException
Add a user to the organization, without sending email.
It mirrors to the following Smartsheet REST API method: POST /users
user - the user objectIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationUser addUser(User user, boolean sendEmail) throws SmartsheetException
Add a user to the organization, without sending email.
It mirrors to the following Smartsheet REST API method: POST /users
user - the usersendEmail - the send email flagIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationUserProfile getUser(long userId) throws SmartsheetException
Get the current user.
It mirrors to the following Smartsheet REST API method: GET /users/{userId}
userId - the user idIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationUserProfile getCurrentUser() throws SmartsheetException
Get the current user.
It mirrors to the following Smartsheet REST API method: GET /user/me
IllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationUserProfile getCurrentUser(EnumSet<UserInclusion> includes) throws SmartsheetException
Get the current user.
It mirrors to the following Smartsheet REST API method: GET /user/me
includes - used to specify the optional objects to include.IllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationUser updateUser(User user) throws SmartsheetException
Update a user.
It mirrors to the following Smartsheet REST API method: PUT /user/{id}
user - the user to updateIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationvoid deleteUser(long id,
DeleteUserParameters parameters)
throws SmartsheetException
Delete a user in the organization.
It mirrors to the following Smartsheet REST API method: DELETE /user/{id}
id - the id of the userparameters - the object containing parameters for deleting usersIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationPagedResult<Sheet> listOrgSheets(PaginationParameters pagination, Date modifiedSince) throws SmartsheetException
List all organisation sheets.
It mirrors to the following Smartsheet REST API method: GET /users/sheets
pagination - the object containing the pagination query parametersmodifiedSince - restrict to sheets modified on or after this dateIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operation@Deprecated PagedResult<Sheet> listOrgSheets(PaginationParameters pagination) throws SmartsheetException
List all organisation sheets.
It mirrors to the following Smartsheet REST API method: GET /users/sheets
pagination - the object containing the pagination query parametersIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationPagedResult<AlternateEmail> listAlternateEmails(long userId, PaginationParameters pagination) throws SmartsheetException
List all user alternate email(s).
It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails
userId - the userIDpagination - the pagination parametersIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationAlternateEmail getAlternateEmail(long userId, long altEmailId) throws SmartsheetException
Get alternate email.
It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails/{alternateEmailId}
userId - the id of the useraltEmailId - the alternate email id for the alternate email to retrieve.IllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationList<AlternateEmail> addAlternateEmail(long userId, List<AlternateEmail> altEmails) throws SmartsheetException
Add an alternate email.
It mirrors to the following Smartsheet REST API method: POST /users/{userId}/alternateemails
userId - the id of the useraltEmails - List of alternate email address to add.IllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationvoid deleteAlternateEmail(long userId,
long altEmailId)
throws SmartsheetException
Delete an alternate email.
It mirrors to the following Smartsheet REST API method: DELETE /users/{userId}/alternateemails/{alternateEmailId}
userId - the id of the useraltEmailId - the alternate email id for the alternate email to retrieve.IllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationAlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException
Promote and alternate email to primary.
userId - id of the useraltEmailId - alternate email idIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - f there is any other error during the operationUser addProfileImage(long userId, String file, String fileType) throws SmartsheetException, FileNotFoundException
Uploads a profile image for the specified user.
userId - id of the userfile - path to the image filefileType - content type of the image fileIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - f there is any other error during the operationFileNotFoundExceptionCopyright © 2014–2019 Smartsheet. All rights reserved.