Viewing Permissions

The GET method retrieves the permissions defined on a resource, including both user-based and role-based permissions.

Method

URL

GET

http://<host>:<port>/jasperserver[-pro]/rest/permission/path/to/resource/

Return Value on Success

Typical Return Values on Failure

200 OK – The body is XML that describes all permissions for the resource.

404 Not Found – When the specified resource URI is not found in the repository.

The permissions for each user and each role are indicated by the following values. These values are not a true mask; they should be treated as constants:

No access: 0

Read-delete: 18

Administer: 1

Read-write-delete: 30

Read-only: 2

Execute-only: 32

The response to the GET request is an entityResource that defines each permission on the resource. Permissions for roles or users that are not specified are inherited from their parent folder:

<entityResource>
  <Item xsi:type="objectPermissionImpl"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <permissionMask>2</permissionMask>
    <permissionRecipient xsi:type="roleImpl">
      <externallyDefined>false</externallyDefined>
      <roleName>ROLE_USER</roleName>
    </permissionRecipient>
    <URI>repo:/path/to/resource</URI>
  </Item>
  <Item xsi:type="objectPermissionImpl"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <permissionMask>30</permissionMask>
    <permissionRecipient xsi:type="roleImpl">
      <externallyDefined>false</externallyDefined>
      <roleName>ROLE_DEMO</roleName>
    </permissionRecipient>
    <URI>repo:/path/to/resource</URI>
  </Item>
  <Item xsi:type="objectPermissionImpl"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <permissionMask>30</permissionMask>
    <permissionRecipient xsi:type="userImpl">
      <externallyDefined>false</externallyDefined>
      <fullName>California User</fullName>
      <tenantId>organization_1</tenantId>
      <username>CaliforniaUser</username>
    </permissionRecipient>
    <URI>repo:/path/to/resource</URI>
  </Item>
  <Item xsi:type="objectPermissionImpl"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <permissionMask>30</permissionMask>
    <permissionRecipient xsi:type="userImpl">
      <externallyDefined>false</externallyDefined>
      <fullName>Joe User</fullName>
      <tenantId>organization_1</tenantId>
      <username>joeuser</username>
    </permissionRecipient>
    <URI>repo:/path/to/resource</URI>
  </Item>
</entityResource>
Feedback