vCloud API Programming Guide
112 VMware, Inc.
FullNameandEmailAddressareretrievedfromLDAP.ValuesforIsEnabled,Description,andother
elementscanbespecifiedintherequestbodyoraddlater.See“ModifyUserMetadata”onpage 112.
Get an Administrative View of a User
EachuserinanorganizationisrepresentedbyaUserReferenceelement.AGETrequesttotheURLinthe
hrefattributeofaUserReferencereturnsaUserelementintheresponse,asshowninExample 6‐26.
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"
href="http://vcloud.example.com/api/v1.0/admin/user/85" ...>
<Link rel="edit" type="application/vnd.vmware.admin.user+xml"
href="http://vcloud.example.com/api/v1.0/admin/user/85"/>
<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"
href="http://vcloud.example.com/api/v1.0/admin/role/1"/>
<GroupReferences/>
</User>
Modify User Metadata
AnadministratorcanusetheeditlinkinaUserelementtomodifyusermetadata.Therequestin
Example 6‐27disablestheUserobjectbysettingvalueofitsIsEnabledelementtofalse.Asisthecasewith
allrequests,therequestbodymustincludeallrequiredelements,whetherornot
youarechangingthem.The
responseisthefullUserelement,includingthechangedmetadata,andincludesthelinksandothermetadata
typicallysuppliedbytheserver.
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"
href="http://vcloud.example.com/api/v1.0/admin/role/105"/>
</User>