Package ch.aaap.harvestclient.api
Interface RolesApi
- All Known Implementing Classes:
RolesApiImpl
public interface RolesApi
Also needs Team Feature enabled
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdd a role to a userCreate a new RolevoidDelete an existing Role.Return an existing Role.list()list(int page, int perPage) removeUser(Reference<Role> roleReference, Reference<User> userReference) Removes the given role from the given userUpdates the specific role by setting the values of the parameters passed.
-
Method Details
-
list
- Returns:
- a list of all Roles in the account, sorted by creation date, newest first.
-
list
- Parameters:
page- the page numberperPage- how many results to return for one page. Max 100- Returns:
- a list of all Roles in the account, sorted by creation date, newest first.
-
get
Return an existing Role.- Parameters:
roleReference- a reference to an existing Role- Returns:
- the full Role object
-
create
Create a new Role- Parameters:
roleInfo- creation information- Returns:
- the created Role
-
update
Updates the specific role by setting the values of the parameters passed. Any parameters not provided will be left unchanged- Parameters:
roleReference- An existing Role to be updatedtoChange- the changes to be performed- Returns:
- the updated Role
-
addUser
Add a role to a user- Parameters:
roleReference- the role to be assigneduserReference- the user that will be assigned the role- Returns:
- the updated Role
-
removeUser
Removes the given role from the given user- Parameters:
roleReference- the role to be removeduserReference- the user that will lose the role- Returns:
- the updated Role
-
delete
Delete an existing Role. Will unlink it from any users assigned to it.- Parameters:
roleReference- a reference to the Role to be deleted
-