Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.36 KB

userRoles_update.rst

File metadata and controls

62 lines (40 loc) · 1.36 KB

userRoles_update

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.

Security Summary

  • Requires Authentication: true
  • Entitlements Required: user_create

URI Parameters

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

HTTP Request Body Parameters

A roles-object object

Example Request

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