The user Service

The GET method for the user service returns descriptors for all users that match the search string. In commercial editions, the scope of the search is the administrator’s organization and all suborganizations. In the community project, there are no organizations, and the scope is all users defined in the server. If no search string is specified, all users are returned. If no users match the search string, the method returns an empty list.

Method

URL

GET

http://<host>:<port>/jasperserver[-pro]/rest/user/<searchString>

Return Value on Success

Typical Return Values on Failure

200 OK – The content is a descriptor for each of the users that match the search.

 

The following example shows the descriptors for users that match the search string “joe”:

<users>
  <user>
    <enabled>true</enabled>
    <externallyDefined>false</externallyDefined>
    <fullName>Joe User</fullName>
    <previousPasswordChangeTime>2011-11-29T10:18:38.062-08:00
      </previousPasswordChangeTime>
    <roles>
      <externallyDefined>false</externallyDefined>
      <roleName>ROLE_USER</roleName>
    </roles>
    <tenantId>organization_1</tenantId>
    <username>joeuser</username>
  </user>
  <user>
    <emailAddress></emailAddress>
    <enabled>true</enabled>
    <externallyDefined>false</externallyDefined>
    <fullName>joeuser</fullName>
    <previousPasswordChangeTime>2011-11-29T15:52:18.407-08:00
      </previousPasswordChangeTime>
    <roles>
      <externallyDefined>false</externallyDefined>
      <roleName>ROLE_USER</roleName>
    </roles>
    <tenantId>SubOrganization</tenantId>
    <username>joeuser</username>
  </user>
</users>

The descriptor above is from a commercial edition, and each user has a tenantId element to indicate which organization the user belongs to. The community project does not have organizations and thus does not specify the tenantId element.

The externallyDefined property is true when the user is authenticated by a 3rd party such as an LDAP directory or single sign-on mechanism. For more information, see the JasperReports Server Authentication Cookbook.

Version: 
Feedback