userRoles_update

PUT /users/{uid}/roles

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 for a complete list of all the role attributes.

Security Summary

  • Requires Authentication: true
  • Entitlements Required: user_create

URI Parameters

  • uid (required): the user name (login name) of the user

HTTP Request Body Parameters

A roles object

Example Request

curl "https://uforge.example.com/api/users/{uid}/roles" -X PUT \
-u USER_LOGIN:PASSWORD -H "Accept: application/xml"-H "Content-type: 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>