Get An Administrative View Of A User; Modify User Metadata - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide
FullName and EmailAddress are retrieved from LDAP. Values for IsEnabled, Description, and other 
elements can be specified in the request body or add later. See "Modify User Metadata" on page 112.

Get an Administrative View of a User

Each user in an organization is represented by a UserReference element. A GET request to the URL in the 
href attribute of a UserReference returns a User element in the response, as shown in Example
Example 6-26. Get an Administrative View of a User
Request:
GET http://vcloud.example.com/api/v1.0/admin/user/85
Response:
200 OK
Content-Type: application/vnd.vmware.admin.user+xml
...
<User name="user@example.com" type="application/vnd.vmware.admin.user+xml"
<Link rel="edit" type="application/vnd.vmware.admin.user+xml"
<FullName>Example User Full Name</FullName>
<EmailAddress>user@example.com</EmailAddress>
<Telephone/>
<IsEnabled>true</IsEnabled>
<IM/>
<NameInSource>user@example.com</NameInSource>
<IsAlertEnabled>false</IsAlertEnabled>
<IsDefaultCached>false</IsDefaultCached>
<StoredVmQuota>1000</StoredVmQuota>
<DeployedVmQuota>100</DeployedVmQuota>
<Role type="application/vnd.vmware.admin.role+xml" name="User"
<GroupReferences/>
</User>

Modify User Metadata

An administrator can use the edit link in a User element to modify user metadata. The request in 
Example
6‐27 disables the User object by setting value of its IsEnabled element to false. As is the case with 
all requests, the request body must include all required elements, whether or not you are changing them. The 
response is the full User element, including the changed metadata, and includes the links and other metadata 
typically supplied by the server.
Example 6-27. Modify User Metadata
Request:
PUT http://vcloud.example.com/api/v1.0/admin/user/85
Content-Type: application/vnd.vmware.admin.user+xml
...
<User name="ExampleUser" xmlns="http://www.vmware.com/vcloud/v1">
<IsEnabled>false</IsEnabled>
<Role type="application/vnd.vmware.admin.role+xml"
</User>
112
href="http://vcloud.example.com/api/v1.0/admin/user/85" ...>
href="http://vcloud.example.com/api/v1.0/admin/user/85"/>
href="http://vcloud.example.com/api/v1.0/admin/role/1"/>
href="http://vcloud.example.com/api/v1.0/admin/role/105"/>
6‐26.
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents