Modifying a Role

To change the name of a role, send a PUT request to the rest_v2/roles service and specify the new name in the role descriptor.

In the community edition of the server, or commercial editions without organizations, use the first form of the URL.
In commercial editions with organizations, use the second URL to specify the user’s organization. When specifying the organization, use its unique ID, not its path. When logged in as the system admin (superuser), use the first URL to modify roles in the root organization.

The only property of a role that you can modify is the role’s name. After the update, all members of the role are members of the new role name, and all permissions associated with the old role name are updated to the new role name.

Method

URL

PUT

http://<host>:<port>/jasperserver[-pro]/rest_v2/roles/roleID

http://<host>:<port>/jasperserver[-pro]/rest_v2/organizations/orgID/roles/roleID

Content-Type

Content

application/xml

application/json

A role descriptor containing a single property:

name – The new name for the role.

Return Value on Success

Typical Return Values on Failure

200 OK – The role was successfully updated. The response contains the full descriptor of the updated role.

404 Not Found – When the organization ID cannot be resolved.

Feedback
randomness