- URL:https://<users-url>/assignRoles
(POST only)
- Required Capability:Default administrator role | All authorized privileges
- Version Introduced:10.1
Description
This operation assigns roles to a user account when working with a user and role store that support reads and writes. By assigning a role to a user, the user account automatically inherits all the permissions that have been assigned to the role.
Request parameters
Parameter | Details |
---|---|
username | The name of the user. Example
|
roles | A comma-separated list of role names. Each of the listed role names must exist in the role store. Example
|
f | The response format. The default response format is html. Values: html | json| pjson |
Example usage
Below is a sample POST request for assignRoles:
POST /webadaptor/admin/security/users/assignRoles HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
username=jwhite&roles=editors,planners&f=json
JSON Response example
{"status": "success"}