Class UserRoleListResource


  • public class UserRoleListResource
    extends AbstractJaxRSResource
    The UserRoleListResource service lists roles, permissions, and users. Provides a list of users per role and roles per user.
    • Method Detail

      • getPermissionUsers

        public UserListWrapper getPermissionUsers()
                                           throws Exception
        Returns the list of permission users in the platform.

        Example Request:
        GET pentaho/api/userrolelist/permission-users

        Returns:
        A list of User objects for users with permissions in the platform.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><userList><users>pat</users><users>admin</users><users>suzy</users><users>tiffany</users><users>enco*de:te^s_t$</users></userList>
         
        Throws:
        Exception
      • getPermissionRoles

        public RoleListWrapper getPermissionRoles()
                                           throws Exception
        Return a list of the permission roles in the platform.

        Example Request:
        GET pentaho/api/userrolelist/permission-roles

        Returns:
        A list of permission roles in the platform.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Anonymous</roles><roles>Business Analyst</roles><roles>Authenticated</roles><roles>Report Author</roles><roles>Power User</roles></roleList>
         
        Throws:
        Exception
      • getUsers

        public UserListWrapper getUsers()
                                 throws Exception
        Returns the list of users in the platform.

        Example Request:
        GET pentaho/api/userrolelist/users

        Returns:
        A list of User objects for users in the platform.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><userList><users>pat</users><users>admin</users><users>suzy</users><users>tiffany</users><users>enco*de:te^s_t$</users></userList>
         
        Throws:
        Exception
      • getRoles

        public RoleListWrapper getRoles​(String addExtraRoles)
        Get a list of the standard roles in the platform.

        Example Request:
        GET pentaho/api/userrolelist/roles

        Returns:
        A list of Role objects that contains the standard roles in the platform.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Anonymous</roles><roles>Business Analyst</roles><roles>Authenticated</roles><roles>Report Author</roles><roles>Power User</roles></roleList>
         
      • getAllRoles

        public RoleListWrapper getAllRoles()
                                    throws Exception
        Get a list of the all roles in the platform including Anonymous and Administrator.

        Example Request:
        GET pentaho/api/userrolelist/allRoles

        Returns:
        A list of Role objects that contains all the roles in the platform.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Anonymous</roles><roles>Business Analyst</roles><roles>Authenticated</roles><roles>Report Author</roles><roles>Power User</roles><roles>Authenticated</roles><roles>Anonymous</roles></roleList>
         
        Throws:
        Exception
      • getSystemRoles

        public RoleListWrapper getSystemRoles()
        Returns Roles identified as "system roles" from the repository.

        Example Request:
        GET pentaho/api/userrolelist/systemRoles

        Returns:
        A list of system roles.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Authenticated</roles><roles>Administrator</roles><roles>Anonymous</roles></roleList>
         
      • getExtraRoles

        public RoleListWrapper getExtraRoles()
        Returns roles identified as "extra roles" from the repository.

        Example Request:
        GET pentaho/api/userrolelist/extraRoles

        Returns:
        Roles identified as "extra roles" are returned as a list from the repository as shown in the example.

        Example Response:

             <?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Authenticated</roles><roles>Anonymous</roles></roleList>
         
      • getRolesForUser

        public RolesWrapper getRolesForUser​(String user)
                                     throws Exception
        Gets the roles for the given user.

        Example Request:
        GET pentaho/api/userrolelist/getRolesForUser?user=admin

        Parameters:
        user - The username to get the roles for
        Returns:
        A list of Role objects containing the roles for the given user.

        Example Response:

             <?xml version="1.0" encoding="UTF-8"?><roles><role>Administrator</role><role>Authenticated</role></roles>
         
        Throws:
        Exception
      • getUsersInRole

        public UsersWrapper getUsersInRole​(String role)
                                    throws Exception
        Gets the list of users that have the role specified by the role parameter. The list of valid roles can be obtained by calling the /roles endpoint.

        Example Request:
        GET pentaho/api/userrolelist/getUsersInRole?role=Authenticated

        Parameters:
        role - The role to get the users for
        Returns:
        A list of User objects that have the roles specified in the role parameter.

        Example Response:

             <?xml version="1.0" encoding="UTF-8"?><users><user>pat</user><user>admin</user><user>suzy</user><user>tiffany</user><user>enco*de:te^s_t$</user></users>
         
        Throws:
        Exception