Product SiteDocumentation Site

14.5.  Users Sub-Collection

A desktop virtual machine may have a set of users attached to it, represented via the users sub-collection. As per the usual idiom, POSTing to this collection attaches a user to the virtual machine, whereas DELETEing from it has the effect of detaching that user.

Note

Users referenced in this way must already exist in the Red Hat Enterprise Virtualization Manager user database, and may be identified either via their ID or by user prinicpal name (see Chapter 18, Users). In the example below, the latter approach is taken.
Example 14.8. Attaching a user to a virtual machine
POST /rhevm-api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/users HTTP/1.1
Content-type: application/xml
Accept: application/xml

<user>
    <user_name>rhevmadmin@domain.example.com</user_name>
</user>