5.1

Table Of Contents
View or Change the Owner of an Object
You can view the owner of a VApp, VAppTemplate, Disk, or Media object by making a GET request to the object's
owner link. If you have adequate rights, you can change the owner of a Disk or VApp object, but not that of a
VAppTemplate or Media object. An administrator can view or change the owner of any object.
The initial owner of a VApp, VAppTemplate, Catalog, Disk, or Media object is the user who created it. Ownership
is expressed in an Owner element that the object representation contains. This element includes a User element
that references the owner. Object-specific rights to change ownership are included in several predefined roles.
See “Predefined Roles and Their Rights,” on page 187.
Prerequisites
n
To change the owner of a Disk or VApp object, you must be an organization administrator or system
administrator, or a user whose role includes the right to change the owner of these objects.
n
To change the owner of a Catalog object, you must be an organization administrator or the system
administrator.
Procedure
1 Retrieve the Owner element from the object.
This element includes a reference to the current owner and an edit URL you can use to change the owner.
This request retrieves the owner of a vApp.
GET https://vcloud.example.com/api/vApp/vapp-7/owner
2 Modify the Owner element to specify a different User.
The user must be a member of the organization that contains the object.
NOTE You cannot modify the Owner of a Media or VAppTemplate object.
3 To change the owner, make a PUT request to the Owner element's rel="edit" URL and supply an Owner
element in the request body.
The User element in the Owner element references the new owner. See “Example: Change the Owner of a
vApp,” on page 79.
Example: Change the Owner of a vApp
Request:
PUT https://vcloud.example.com/api/vApp/vapp-7/owner
Content-type: application/vnd.vmware.vcloud.owner+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<Owner
xmlns="http://www.vmware.com/vcloud/v1.5">
<User
type="application/vnd.vmware.admin.user+xml"
href="https://vcloud.example.com/api/admin/user/120" />
</Owner>
Response:
204 No Content
Chapter 4 Provisioning an Organization
VMware, Inc. 79