PUT /users/{uid}/roles
Summary
- Method:
PUT
- Response Code:
200
- Response Formats:
application/xml
application/json
- Since:
UForge 3.4
Updates the roles for an user. Any new role in the list will be added to the user. Any role already provided to the user, but no longer in the new list will be removed.
Please refer to role-object
for a complete list of all the role
attributes.
- Requires Authentication:
true
- Entitlements Required:
user_create
uid
(required): the user name (login name) of theuser-object
A roles-object
object
curl "https://uforge.example.com/api/users/{uid}/roles" -X PUT \
-u USER_LOGIN:PASSWORD -H "Accept: application/xml" --data-binary "@representation.xml"
Example of representation.xml content (the request body):
<ns0:roles xmlns:ns0="http://www.usharesoft.com/uforge">
<roles>
<role>
<name>role1</name>
</role>
</roles>
</ns0:roles>
role-object
rolesandentitlements-api-resources
userRoles-getAll