The GET method of the v2/permissions service lists permissions on a given resource according to several arguments.
Method |
URL |
||
GET |
http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions/path/to/resource/?<arguments> |
||
Argument |
Type/Value |
Description |
|
effective |
boolean |
When set to true, the effective permissions are returned. By default, this argument is false and only assigned permissions are returned. |
|
recipientType |
String |
Either user or role. When not specified, the recipient type is the role. |
|
recipientId |
String |
Id of the user or role. In environments with multiple organizations, specify the the organization as <recipientID>%7C<orgID> |
|
resolveAll |
boolean |
When set to true, shows the effective permissions for all users and all roles. |
|
Options |
|||
accept: application/xml (default) accept: application/json |
|||
Return Value on Success |
Typical Return Values on Failure |
||
200 OK – The body describes the requested permissions for the resource. |
400 Bad Request – When the recipient type is invalid. 404 Not Found – When the specified resource URI is not found in the repository or the recipient ID cannot be resolved. |
For example, the following request shows all permission for a resource, similar to the permissions dialog in the user interface:
GET http://localhost:8080/jasperserver-pro/rest_v2/permissions/public?resolv...
<permissions> <permission> <mask>0</mask> <recipient>user:anonymousUser</recipient> </permission> <permission> <mask>0</mask> <recipient>user:CaliforniaUser|organization_1</recipient> </permission> ... <permission> <mask>2</mask> <recipient>role:ROLE_USER</recipient> <uri>/public</uri> </permission> </permissions> |